/* ===========================================
   DESIGN SYSTEM — Robert Hidri Portfolio
   
   Aesthetic: Technical-clean with warmth
   Font: DM Sans (body) + JetBrains Mono (code/accents)
   Palette: Deep navy + electric blue accent + warm grays
   =========================================== */

/* --- Variables --- */
:root {
    --bg:          #0a0c10;
    --bg-surface:  #12151c;
    --bg-card:     #1a1e28;
    --bg-alt:      #0e1116;
    --border:      #2d3548;
    --border-hover:#4a5568;

    --text:        #f1f5f9;
    --text-muted:  #94a3b8;
    --text-dim:    #64748b;

    --accent:      #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.2);
    --accent-dark: #2563eb;
    --accent-soft: rgba(59, 130, 246, 0.1);

    --font:       'DM Sans', -apple-system, sans-serif;
    --font-mono:  'JetBrains Mono', 'Courier New', monospace;

    --radius:      0.625rem;
    --radius-lg:   1rem;
    --transition:  0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    font-family: var(--font);
    line-height: 1.65;
    color: var(--text);
    background: #050508;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: #60a5fa; }

img { max-width: 100%; display: block; }

/* --- Nav --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(12, 15, 20, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}
.nav-logo:hover { color: var(--text); }
.nav-logo .accent { color: var(--accent); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.nav-links a {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
    padding: 0.4rem 1rem !important;
    background: var(--accent);
    color: white !important;
    border-radius: var(--radius);
    font-weight: 600 !important;
}
.nav-cta:hover { background: var(--accent-dark); color: white !important; }

/* Work in Progress Badge */
.wip-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 2rem;
}

.wip-badge::before {
    content: '🚧';
    font-size: 0.75rem;
}

/* --- Hero Compact (3-Column Layout) --- */
.hero-compact {
    position: relative;
    min-height: auto;
    display: flex;
    align-items: flex-start;
    padding: 5rem 2rem 1.5rem;
    background:
        radial-gradient(ellipse 50% 50% at 30% 50%, rgba(59, 130, 246, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 70% 30%, rgba(139, 92, 246, 0.04) 0%, transparent 60%);
}

.hero-layout {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 230px 1fr 230px;
    gap: 1.5rem;
    align-items: start;
    width: 100%;
}

/* Left Column: Profile + Contact */
.left-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 5rem;
}

/* Profile Card (Static Photo + Expandable Bio) */
.profile-card {
    text-align: center;
}

/* Profile Photo - Static */
.profile-photo-wrapper {
    width: 140px;
    height: 140px;
    margin: 0 auto 1rem;
    position: relative;
}

.profile-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    border: 3px solid var(--bg-card);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    overflow: hidden;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.125rem;
}

.profile-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.profile-location {
    font-size: 0.6875rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

/* Quick Stats Row */
.profile-quick-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.quick-stat strong {
    color: var(--accent);
    font-family: var(--font-mono);
}

.quick-stat-divider {
    color: var(--border);
}

/* Expandable Bio Section */
.profile-bio-wrapper {
    margin-bottom: 1rem;
    text-align: left;
}

.profile-bio-preview {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
    cursor: pointer;
    transition: all var(--transition);
}

.profile-bio-preview:hover {
    border-color: var(--accent);
}

.bio-teaser {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.bio-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    width: 100%;
    padding: 0.375rem;
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 0.6875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.bio-expand-btn:hover {
    color: #60a5fa;
}

.expand-icon {
    font-size: 0.625rem;
    transition: transform 0.3s ease;
}

/* Expanded state */
.profile-bio-wrapper.expanded .expand-icon {
    transform: rotate(180deg);
}

.profile-bio-wrapper.expanded .profile-bio-preview {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
}

.profile-bio-full {
    max-height: 0;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: none;
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.profile-bio-wrapper.expanded .profile-bio-full {
    max-height: 800px;
    padding: 0.75rem;
}

.bio-full-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.bio-full-text .bio-paragraph {
    margin-bottom: 0.5rem;
}

.bio-full-text .bio-paragraph:last-child {
    margin-bottom: 0;
}

.bio-full-text .bio-paragraph strong {
    color: var(--text);
    font-weight: 600;
}

.bio-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.bio-highlight {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: var(--accent-soft);
    border-radius: 2rem;
    font-size: 0.625rem;
    color: var(--accent);
}

.profile-actions {
    display: flex;
    justify-content: center;
}

.btn-sm {
    padding: 0.4rem 0.875rem;
    font-size: 0.75rem;
}

/* Contact Mini Tiles */
.contact-mini {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-mini-tile {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all var(--transition);
}

.contact-mini-tile:hover {
    border-color: var(--accent);
    color: var(--text);
    transform: translateX(4px);
}

.contact-mini-tile.preferred {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.contact-mini-tile.preferred:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.contact-mini-icon {
    font-size: 1.125rem;
}

.contact-mini-label {
    flex: 1;
    font-weight: 500;
}

.contact-mini-badge {
    font-size: 0.625rem;
    color: var(--accent);
    font-weight: 600;
}

.contact-mini-tile.contact-mini-static {
    cursor: default;
    opacity: 0.8;
}

.contact-mini-tile.contact-mini-static:hover {
    transform: none;
    border-color: var(--border);
}

.contact-mini-tile.revealed {
    background: var(--accent-soft);
    border-color: var(--accent);
}

.contact-mini-email {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text);
}

/* CV Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-cv {
    width: 800px;
    height: 85vh;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text);
}

.modal-body {
    flex: 1;
    overflow: hidden;
}

.cv-preview {
    width: 100%;
    height: 100%;
    border: none;
}

.modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
}

/* Center Column: Project Showcase */
.center-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.showcase-preview {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    overflow: hidden;
}

.showcase-preview .preview-media {
    aspect-ratio: 21/9;
    max-height: 260px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.showcase-preview .preview-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.preview-media-gallery {
    position: relative;
    width: 100%;
    height: 100%;
}




.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dim);
}

.preview-icon {
    font-size: 2.5rem;
}

.preview-text {
    font-size: 0.75rem;
}

.preview-info {
    display: flex;
    flex-direction: column;
}

.preview-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
}

.preview-description {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0.5rem;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.preview-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.preview-tag {
    font-size: 0.625rem;
    padding: 0.2rem 0.5rem;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 2rem;
    color: var(--accent);
    font-weight: 500;
}

.preview-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.preview-link {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--accent);
}

.no-links {
    font-size: 0.6875rem;
    color: var(--text-dim);
    font-style: italic;
}

.wip-badge-sm {
    font-size: 0.5rem;
    padding: 0.1rem 0.3rem;
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border-radius: 2rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 0.25rem;
    vertical-align: middle;
}

/* Project Tiles Row */
.showcase-tiles {
    display: flex;
    gap: 0.5rem;
}

.showcase-tiles .project-tile {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.625rem;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.25rem;
}

.showcase-tiles .project-tile:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.showcase-tiles .project-tile.active {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.showcase-tiles .tile-icon {
    font-size: 1.25rem;
}

.showcase-tiles .tile-name {
    font-size: 0.625rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.showcase-tiles .tile-status {
    font-size: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-done { color: #10b981; }
.status-active { color: var(--accent); }
.status-wip { color: #fbbf24; }

.showcase-more {
    text-align: center;
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
}

/* Right Column: Skills Sidebar */
.right-column {
    position: sticky;
    top: 5rem;
}

.skills-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.skill-tab {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.skill-tab:hover {
    border-color: var(--border-hover);
    background: rgba(59, 130, 246, 0.03);
}

.skill-tab.expanded {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.skill-tab-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-tab-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.skill-tab.expanded .skill-tab-icon {
    transform: scale(1.1);
}

.skill-tab-name {
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.skill-tab-expand {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                margin-top 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.4s ease;
    opacity: 0;
}

.skill-tab.expanded .skill-tab-expand {
    max-height: 200px;
    margin-top: 0.5rem;
    opacity: 1;
}

.skill-tab-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.skill-item {
    font-size: 0.5625rem;
    padding: 0.2rem 0.4rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 2rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

/* Responsive */
@media (max-width: 1000px) {
    .hero-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .left-column, .right-column {
        position: relative;
        top: 0;
    }
    
    .left-column {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
    }
    
    .contact-mini {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .skills-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .skill-tab {
        flex: 1;
        min-width: 120px;
    }
    
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.75rem;
    font-family: var(--font);
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 24px rgba(59, 130, 246, 0.2);
}
.btn-primary:hover {
    background: var(--accent-dark);
    color: white;
    box-shadow: 0 0 32px rgba(59, 130, 246, 0.35);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.btn-ghost:hover {
    border-color: var(--border-hover);
    color: var(--text);
}

.btn-lg {
    padding: 1rem 2.25rem;
    font-size: 1rem;
}

/* --- Sections --- */
.section {
    padding: 3rem 2rem;
    position: relative;
    background: rgba(10, 12, 16, 0.75);
    backdrop-filter: blur(8px);
}

/* Alternating section backgrounds for visual rhythm */
.section-alt {
    background: rgba(14, 17, 22, 0.8);
}

/* Subtle section dividers */
.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    max-width: 400px;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(59, 130, 246, 0.2) 50%,
        transparent 100%
    );
}

.section:first-of-type::before,
.hero + main .section:first-child::before {
    display: none;
}

.section-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.section-cta {
    background: rgba(20, 24, 32, 0.95);
    border-top: 1px solid rgba(59, 130, 246, 0.15);
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.section h2 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 2.5rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-top: -1.5rem;
    margin-bottom: 2rem;
}
.section-subtitle a {
    color: var(--accent);
}

/* --- Project Showcase (legacy/dashboard) --- */
.preview-image,
.preview-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-thumbnails {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.thumb {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid var(--border);
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--transition);
}
.thumb:hover,
.thumb.active {
    border-color: var(--accent);
}
.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-details {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    flex: 1;
}

.preview-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wip-badge-sm {
    font-size: 0.625rem;
    padding: 0.15rem 0.5rem;
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border-radius: 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.preview-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.preview-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 1rem;
}

.preview-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 2rem;
    color: var(--text-muted);
}

.preview-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.preview-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.preview-link:hover {
    color: #60a5fa;
}

.no-links {
    font-size: 0.8125rem;
    color: var(--text-dim);
    font-style: italic;
}

/* Project Tiles */
.project-tiles {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-tile {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all var(--transition);
}

.project-tile:hover {
    border-color: var(--border-hover);
    transform: translateX(-4px);
}

.project-tile.active {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.tile-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.tile-content {
    flex: 1;
    min-width: 0;
}

.tile-content h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tile-status {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-done { color: #10b981; }
.status-active { color: var(--accent); }
.status-wip { color: #fbbf24; }

.projects-cta {
    text-align: center;
    margin-top: 2rem;
}

/* --- Journey Grid (Experience & Education) --- */
.journey-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.journey-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.journey-heading {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.journey-tiles {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.journey-tile {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition);
    overflow: hidden;
}

.journey-tile:hover {
    border-color: var(--border-hover);
}

.journey-tile.expanded {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.tile-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
}

.journey-tile .tile-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.tile-info {
    flex: 1;
    min-width: 0;
}

.tile-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tile-date {
    font-size: 0.6875rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

.tile-arrow {
    color: var(--text-dim);
    transition: transform var(--transition);
    font-size: 0.75rem;
}

.journey-tile.expanded .tile-arrow {
    transform: rotate(90deg);
    color: var(--accent);
}

/* Expandable content */
.tile-expand {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1rem;
}

.journey-tile.expanded .tile-expand {
    max-height: 400px;
    padding: 0 1rem 1rem;
}

.tile-role {
    font-size: 0.8125rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.tile-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.tile-gpa {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.tile-thesis {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-left: 2px solid var(--accent);
    border-radius: var(--radius);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
}

.tile-thesis .thesis-grade {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.tile-thesis .thesis-link {
    display: inline-block;
    margin-top: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.tile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .journey-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .project-showcase {
        grid-template-columns: 1fr;
    }
    
    .project-tiles {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .project-tile {
        flex-shrink: 0;
        min-width: 160px;
    }
    
    .project-tile:hover {
        transform: translateY(-2px);
    }
}

/* --- About --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
}
.about-text strong { color: var(--text); }

.about-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.highlight-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: all var(--transition);
}
.highlight-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.highlight-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.highlight-card h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.highlight-card p {
    font-size: 0.8125rem;
    color: var(--text-dim);
    line-height: 1.5;
}

/* --- Skills --- */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.skill-group h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.skill-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pill {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 2rem;
    color: var(--text-muted);
    transition: all var(--transition);
}
.pill:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.pill-sm {
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
}

/* --- Timeline --- */
.timeline {
    position: relative;
    padding-left: 2rem;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.4rem;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    transform: translateX(-5px);
    box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--border);
}

.timeline-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.timeline-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-dim);
}

.timeline-location {
    font-size: 0.8125rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.timeline-content > p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* --- Contact --- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    padding: 2rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all var(--transition);
}
.contact-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.1);
}

.contact-icon { font-size: 1.75rem; }
.contact-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.contact-value {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Protected contact (click to reveal) */
.contact-card-protected {
    cursor: pointer;
}
.contact-card-protected:hover {
    border-color: var(--accent);
}

.contact-hint {
    display: block;
    font-size: 0.6875rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
}

.contact-card-revealed {
    cursor: pointer;
}
.contact-card-revealed .contact-hint {
    color: var(--accent);
}

/* Preferred contact (LinkedIn) */
.contact-card-preferred {
    border-color: var(--accent);
    background: var(--accent-soft);
    position: relative;
}
.contact-card-preferred:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.25);
}

.contact-badge {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--accent);
    margin-top: 0.25rem;
}

/* Static contact (location) */
.contact-card-static {
    cursor: default;
}
.contact-card-static:hover {
    transform: none;
    box-shadow: none;
}

/* Contact note */
.contact-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* --- Education specific --- */
.timeline-gpa {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.thesis-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 1rem;
    margin: 0.75rem 0;
    font-size: 0.875rem;
}

.thesis-grade {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
}

.thesis-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

/* --- References --- */
.references-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.reference-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
}

.reference-card::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 4rem;
    font-family: Georgia, serif;
    color: var(--accent);
    opacity: 0.2;
    line-height: 1;
}

.reference-card blockquote {
    font-size: 0.9375rem;
    font-style: italic;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
}

.reference-author {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.reference-author strong {
    font-size: 0.9375rem;
    color: var(--text);
}

.reference-author span {
    font-size: 0.8125rem;
    color: var(--text-dim);
}

/* --- Hobbies --- */
.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.hobby-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition);
}

.hobby-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.hobby-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.75rem;
}

.hobby-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.hobby-card p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* --- Contact static card (no link) --- */
.contact-card-static {
    cursor: default;
}
.contact-card-static:hover {
    border-color: var(--border);
    transform: none;
    box-shadow: none;
}

/* --- Footer --- */
.footer {
    border-top: 1px solid var(--border);
    padding: 2rem;
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}
.footer p {
    font-size: 0.8125rem;
    color: var(--text-dim);
}

/* --- Animations --- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav-links a:not(.nav-cta) { display: none; }

    .about-grid {
        grid-template-columns: 1fr;
    }
    .about-highlights {
        grid-template-columns: 1fr 1fr;
    }
    .skills-grid {
        grid-template-columns: 1fr;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .hero-stats {
        gap: 2rem;
    }
    .section { padding: 3.5rem 1.25rem; }
}

@media (max-width: 480px) {
    .about-highlights {
        grid-template-columns: 1fr;
    }
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
}
/* ===========================================
   ACCESSIBILITY & UI ADDITIONS
   =========================================== */

/* --- Skip to Content --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius);
    z-index: 9999;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0.5rem;
    color: white;
}

/* --- Focus Indicators --- */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* --- Mobile Hamburger Menu --- */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.nav-toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-muted);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-toggle.active .nav-toggle-bar:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
.nav-toggle.active .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle.active .nav-toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 3.5rem;
        left: 0;
        right: 0;
        background: rgba(12, 15, 20, 0.95);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 1.5rem 2rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-links a {
        display: block !important;
        font-size: 1rem;
        padding: 0.5rem 0;
    }
}

/* --- Toast Notifications --- */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.875rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: all;
}

/* --- Empty / Error States --- */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-dim);
}

.error-state {
    color: #ef4444;
}

/* --- Noscript Fallback --- */
.noscript-msg {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 600px;
    margin: 2rem auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

}

/* --- Minimum Font Size Fixes --- */
.skill-item {
    font-size: 0.6875rem;
}

.tile-status,
.wip-badge-sm {
    font-size: 0.625rem;
}

.showcase-tiles .tile-name {
    font-size: 0.6875rem;
}

.module-note {
    margin-top: 1.5rem;
    font-style: italic;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ===========================================
   LIGHT MODE — Toggle-based (not auto)
   Applied via data-theme="light" on <html>.
   Dark is always the default.
   =========================================== */
[data-theme="light"] {
    --bg:          #f8f9fb;
    --bg-surface:  #ffffff;
    --bg-card:     #ffffff;
    --bg-alt:      #f1f3f7;
    --border:      #d1d5db;
    --border-hover:#9ca3af;

    --text:        #1f2937;
    --text-muted:  #4b5563;
    --text-dim:    #6b7280;

    --accent:      #2563eb;
    --accent-glow: rgba(37, 99, 235, 0.15);
    --accent-dark: #1d4ed8;
    --accent-soft: rgba(37, 99, 235, 0.08);
}

[data-theme="light"] body {
    background: #f0f2f5;
}

[data-theme="light"] .nav {
    background: rgba(248, 249, 251, 0.9);
}

[data-theme="light"] .section {
    background: rgba(248, 249, 251, 0.8);
}

[data-theme="light"] .section-alt {
    background: rgba(241, 243, 247, 0.85);
}

[data-theme="light"] .modal {
    background: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .hero-compact {
    background:
        radial-gradient(ellipse 50% 50% at 30% 50%, rgba(37, 99, 235, 0.04) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 70% 30%, rgba(139, 92, 246, 0.03) 0%, transparent 60%);
}

[data-theme="light"] .profile-photo {
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.15);
}

[data-theme="light"] .section::before {
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(37, 99, 235, 0.15) 50%,
        transparent 100%
    );
}

[data-theme="light"] .btn-primary {
    box-shadow: 0 0 16px rgba(37, 99, 235, 0.15);
}

[data-theme="light"] .toast {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* --- Theme Toggle Button --- */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    transition: all var(--transition);
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--text);
}
