/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-black: #000000;
    --bg-gray-950: #0a0a0a;
    --bg-gray-900: #111111;
    --bg-gray-850: #1a1a1a;
    --bg-gray-800: #222222;
    --bg-gray-700: #333333;
    --green-400: #4ade80;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --cyan-400: #22d3ee;
    --yellow-400: #facc15;
    --text-white: #ffffff;
    --text-gray-300: #d1d5db;
    --text-gray-500: #6b7280;
    --border-green: rgba(34, 197, 94, 0.3);
    --shadow-green: rgba(34, 197, 94, 0.2);
    --font-mono: 'Courier New', Monaco, 'Ubuntu Mono', monospace;
}

body {
    font-family: var(--font-mono);
    background-color: var(--bg-black);
    color: var(--text-white);
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

/* Boot Sequence */
.boot-sequence {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-black);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.boot-lines {
    color: var(--green-400);
    font-size: clamp(12px, 3vw, 14px);
    line-height: 1.8;
    text-align: left;
    max-width: 600px;
    width: 100%;
}

.boot-lines div {
    animation: fadeIn 0.3s ease-out forwards;
    opacity: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.boot-lines div:nth-child(1) { animation-delay: 0.2s; }
.boot-lines div:nth-child(2) { animation-delay: 0.4s; }
.boot-lines div:nth-child(3) { animation-delay: 0.6s; }
.boot-lines div:nth-child(4) { animation-delay: 0.8s; }
.boot-lines div:nth-child(5) { animation-delay: 1s; }

@keyframes fadeIn {
    to { opacity: 1; }
}

/* App Container */
.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background-color: var(--bg-gray-950);
    border-bottom: 1px solid var(--border-green);
    padding: 0 5vw;
}

.header-top {
    padding: 12px 0;
    border-bottom: 1px solid rgba(34, 197, 94, 0.1);
}

.portfolio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--green-400);
    font-size: clamp(10px, 2.5vw, 12px);
    white-space: nowrap;
}

/* Profile Section */
.profile-section {
    padding: 20px 0;
}

.profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .profile-container {
        flex-direction: row;
        align-items: center;
        gap: 40px;
    }
}

.profile-photo-container {
    position: relative;
    flex-shrink: 0;
}

.profile-photo {
    width: 140px;
    height: 140px;
    border-radius: 8px; /* Square with slight rounding */
    object-fit: cover;
    border: 3px solid var(--green-400);
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.3);
}

@media (min-width: 768px) {
    .profile-photo {
        width: 160px;
        height: 160px;
    }
}

.profile-info {
    flex: 1;
    text-align: center;
}

@media (min-width: 768px) {
    .profile-info {
        text-align: left;
    }
}

.name {
    font-size: clamp(28px, 5vw, 40px);
    font-weight: bold;
    margin-bottom: 8px;
    background: linear-gradient(90deg, var(--text-white), var(--green-400));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.2;
}

.role {
    color: var(--green-400);
    font-size: clamp(14px, 3vw, 16px);
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

@media (min-width: 768px) {
    .role {
        justify-content: flex-start;
    }
}

.separator {
    color: var(--text-gray-500);
}

.profile-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 300px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .profile-buttons {
        flex-direction: row;
        margin: 0;
        max-width: none;
    }
}

.btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
    min-width: 160px;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .btn {
        width: 100%;
    }
}

.btn-primary {
    background-color: var(--green-600);
    color: var(--bg-black);
}

.btn-primary:hover {
    background-color: var(--green-500);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-green);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: transparent;
    color: var(--green-400);
    border: 1px solid var(--border-green);
}

.btn-secondary:hover {
    background-color: rgba(34, 197, 94, 0.1);
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Main Content */
.main {
    flex: 1;
    padding: 30px 5vw;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Kernel Terminal */
.kernel-terminal {
    background-color: var(--bg-gray-900);
    border: 2px solid var(--border-green);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-green);
    margin-bottom: 32px;
}

.terminal-header {
    background-color: var(--bg-gray-800);
    border-bottom: 1px solid var(--border-green);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.terminal-controls {
    display: flex;
    gap: 6px;
    order: 1;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
}

.control.close { background-color: #ef4444; }
.control.minimize { background-color: #f59e0b; }
.control.maximize { background-color: #10b981; }

.terminal-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--green-400);
    font-size: clamp(12px, 3vw, 14px);
    order: 2;
    flex: 1;
    justify-content: center;
    min-width: 200px;
}

.terminal-icons {
    display: flex;
    gap: 12px;
    color: var(--green-400);
    order: 3;
}

.terminal-nav {
    background-color: var(--bg-gray-850);
    border-bottom: 1px solid rgba(34, 197, 94, 0.2);
    padding: 12px 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.terminal-nav::-webkit-scrollbar {
    display: none;
}

.nav-btn {
    padding: 8px 12px;
    border-radius: 6px;
    background: none;
    border: none;
    color: var(--green-400);
    font-size: clamp(10px, 2.5vw, 12px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
    text-align: center;
    touch-action: manipulation;
    flex-shrink: 0;
}

.nav-btn:hover {
    background-color: rgba(34, 197, 94, 0.1);
}

.nav-btn.active {
    background-color: var(--green-600);
    color: var(--bg-black);
}

.terminal-content {
    padding: 20px;
    min-height: 400px;
}

.content-area {
    color: var(--text-gray-300);
    font-size: clamp(13px, 3vw, 14px);
    line-height: 1.6;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Contact Section (Separate from terminal) */
.contact-section {
    background-color: var(--bg-gray-900);
    border: 2px solid var(--border-green);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-green);
    margin-top: 32px;
    margin-bottom: 32px;
}

.contact-header {
    background-color: var(--bg-gray-800);
    border-bottom: 1px solid var(--border-green);
    padding: 20px;
}

.contact-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.contact-title i {
    color: var(--green-400);
    font-size: 24px;
}

.contact-title h2 {
    font-size: clamp(18px, 4vw, 24px);
    color: var(--text-white);
    font-weight: 600;
}

.contact-subtitle {
    color: var(--green-400);
    font-size: clamp(12px, 2.5vw, 14px);
    font-family: var(--font-mono);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
}

@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .contact-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.contact-card {
    background-color: var(--bg-gray-800);
    border: 1px solid var(--border-green);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-card:hover {
    background-color: var(--bg-gray-700);
    transform: translateY(-4px);
    border-color: var(--green-400);
    box-shadow: 0 8px 20px var(--shadow-green);
}

.contact-card:active {
    transform: translateY(-2px);
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.contact-card:nth-child(1) .contact-icon {
    background-color: rgba(240, 246, 252, 0.1);
    color: #f0f6fc;
}

.contact-card:nth-child(2) .contact-icon {
    background-color: rgba(10, 102, 194, 0.1);
    color: #0a66c2;
}

.contact-card:nth-child(3) .contact-icon {
    background-color: rgba(234, 67, 53, 0.1);
    color: #ea4335;
}

.contact-card:nth-child(4) .contact-icon {
    background-color: rgba(29, 161, 242, 0.1);
    color: #1da1f2;
}

.contact-info {
    flex: 1;
}

.contact-name {
    color: var(--text-white);
    font-size: clamp(14px, 3vw, 16px);
    font-weight: 600;
    margin-bottom: 4px;
}

.contact-handle {
    color: var(--text-gray-500);
    font-size: clamp(12px, 2.5vw, 13px);
    font-family: var(--font-mono);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-action {
    color: var(--green-400);
    font-size: 14px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.contact-card:hover .contact-action {
    opacity: 1;
}

.contact-footer {
    background-color: var(--bg-gray-850);
    border-top: 1px solid rgba(34, 197, 94, 0.2);
    padding: 12px 20px;
    display: flex;
    justify-content: center;
}

.contact-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--green-400);
    font-size: clamp(12px, 2.5vw, 13px);
}

/* Section Styles */
.section-title {
    color: var(--green-400);
    margin-bottom: 16px;
    font-size: clamp(14px, 3vw, 16px);
}

.section-content {
    color: var(--text-gray-300);
    margin-left: 0;
}

@media (min-width: 768px) {
    .section-content {
        margin-left: 20px;
    }
}

.about-content {
    line-height: 1.8;
}

.experience-item {
    margin-bottom: 24px;
    padding-left: 0;
    border-left: none;
}

@media (min-width: 768px) {
    .experience-item {
        padding-left: 20px;
        border-left: 2px solid rgba(34, 197, 94, 0.3);
    }
}

.experience-role {
    color: var(--text-white);
    font-weight: 600;
    margin-bottom: 4px;
    font-size: clamp(14px, 3vw, 16px);
}

.experience-meta {
    color: var(--yellow-400);
    font-size: clamp(12px, 2.5vw, 13px);
    margin-bottom: 8px;
}

/* Education Section Styles */
.education-item {
    margin-bottom: 24px;
    padding-left: 0;
    border-left: none;
}

@media (min-width: 768px) {
    .education-item {
        padding-left: 20px;
        border-left: 2px solid rgba(33, 150, 243, 0.3);
    }
}

.education-degree {
    color: var(--text-white);
    font-weight: 600;
    margin-bottom: 4px;
    font-size: clamp(14px, 3vw, 16px);
}

.education-school {
    color: var(--cyan-400);
    font-size: clamp(13px, 2.5vw, 14px);
    margin-bottom: 4px;
}

.education-period {
    color: var(--yellow-400);
    font-size: clamp(12px, 2.5vw, 13px);
    margin-bottom: 8px;
}

.education-desc {
    color: var(--text-gray-300);
    font-size: clamp(13px, 2.5vw, 14px);
    line-height: 1.6;
}

/* Projects Section Styles */
/* Projects Section Styles */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 16px;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

.project-card {
    background-color: var(--bg-gray-800);
    border: 1px solid var(--border-green);
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    background-color: var(--bg-gray-700);
    transform: translateY(-4px);
    border-color: var(--green-400);
    box-shadow: 0 10px 25px var(--shadow-green);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.project-name {
    color: var(--text-white);
    font-weight: 600;
    font-size: clamp(15px, 3vw, 17px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-name i {
    color: var(--green-400);
    font-size: 16px;
}

.project-github-link {
    color: var(--text-gray-500);
    font-size: 18px;
    transition: all 0.3s ease;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    text-decoration: none;
}

.project-github-link:hover {
    color: var(--green-400);
    background-color: rgba(34, 197, 94, 0.1);
    transform: translateY(-2px);
}

.project-desc {
    color: var(--text-gray-300);
    font-size: clamp(13px, 2.5vw, 14px);
    line-height: 1.6;
    margin-bottom: 12px;
    flex-grow: 1;
}

.project-tech {
    color: var(--cyan-400);
    font-size: clamp(12px, 2.5vw, 13px);
    font-family: var(--font-mono);
    padding: 6px 12px;
    background-color: rgba(34, 150, 243, 0.1);
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 16px;
    border-left: 3px solid var(--cyan-400);
}

.project-link {
    margin-top: auto;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--green-400);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 16px;
    border: 1px solid var(--border-green);
    border-radius: 6px;
    transition: all 0.3s ease;
    background-color: rgba(34, 197, 94, 0.05);
    width: 100%;
    justify-content: center;
    text-align: center;
}

.github-link:hover {
    background-color: rgba(34, 197, 94, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-green);
}

.github-link i {
    font-size: 16px;
}

/* Mobile adjustments for project cards */
@media (max-width: 767px) {
    .projects-grid {
        gap: 16px;
    }
    
    .project-card {
        padding: 16px;
    }
    
    .project-name {
        font-size: 15px;
    }
    
    .github-link {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .project-tech {
        font-size: 12px;
        padding: 5px 10px;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Add these styles for better mobile touch experience */
@media (hover: none) and (pointer: coarse) {
    .project-card:hover {
        transform: none;
    }
    
    .project-card:active {
        transform: scale(0.98);
        background-color: var(--bg-gray-700);
    }
    
    .github-link:active {
        transform: scale(0.98);
    }
}
/* Mobile adjustments for GitHub links */
@media (max-width: 767px) {
    .github-link {
        width: 100%;
        justify-content: center;
        padding: 8px 16px;
    }
    
    .project-github-link {
        font-size: 16px;
        width: 28px;
        height: 28px;
    }
}

/* Hover effect for entire project card when GitHub link exists */
.project-card:hover .github-link {
    background-color: rgba(34, 197, 94, 0.1);
}

/* Skills Section Styles */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 16px;
}

@media (min-width: 768px) {
    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

.skill-category {
    margin-bottom: 16px;
}

.category-name {
    color: var(--cyan-400);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: clamp(14px, 3vw, 16px);
}

.skill-item {
    color: var(--text-gray-300);
    margin-bottom: 4px;
    padding-left: 16px;
    font-size: clamp(13px, 2.5vw, 14px);
}

.skill-item::before {
    content: "→";
    color: var(--green-400);
    margin-right: 8px;
}

.interests-list,
.learning-list {
    padding-left: 0;
}

@media (min-width: 768px) {
    .interests-list,
    .learning-list {
        padding-left: 20px;
    }
}

.interest-item,
.learning-item {
    color: var(--text-gray-300);
    margin-bottom: 12px;
    padding-left: 0;
    font-size: clamp(13px, 2.5vw, 14px);
}

@media (min-width: 768px) {
    .interest-item {
        padding-left: 16px;
    }
}

.interest-item::before {
    content: "•";
    color: var(--green-400);
    margin-right: 8px;
}

.learning-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.learning-tag {
    color: var(--yellow-400);
    font-size: clamp(11px, 2.5vw, 12px);
    background: rgba(250, 204, 21, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Cursor Animation - Only for About section */
.typing-cursor {
    display: inline-block;
    width: 8px;
    height: 20px;
    background-color: var(--green-400);
    margin-left: 4px;
    vertical-align: middle;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-green);
    padding: 24px 5vw;
    background-color: var(--bg-gray-950);
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.tagline {
    color: var(--green-400);
    font-size: clamp(13px, 3vw, 14px);
    margin-bottom: 8px;
}

.tech-stack {
    color: var(--text-gray-500);
    font-size: clamp(11px, 2.5vw, 12px);
    margin-bottom: 8px;
}

.copyright {
    color: var(--text-gray-500);
    font-size: clamp(11px, 2.5vw, 12px);
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn:hover,
    .nav-btn:hover,
    .contact-card:hover {
        transform: none;
    }
    
    .btn:active,
    .nav-btn:active,
    .contact-card:active {
        transform: scale(0.98);
    }
    
    .contact-card:active {
        background-color: var(--bg-gray-700);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --green-400: #00ff00;
        --green-500: #00cc00;
        --green-600: #009900;
        --border-green: #00ff00;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .typing-cursor {
        animation: none;
        opacity: 1;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-gray-900);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-gray-700);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-gray-600);
}

/* Mobile-specific adjustments */
@media (max-width: 480px) {
    .profile-photo {
        width: 120px;
        height: 120px;
    }
    
    .name {
        font-size: 24px;
    }
    
    .role {
        font-size: 14px;
    }
    
    .terminal-content,
    .contact-grid {
        padding: 15px;
    }
    
    .contact-card {
        padding: 16px;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .education-item,
    .experience-item {
        padding: 10px;
        margin-bottom: 20px;
    }
}