/* ===========================
   CSS VARIABLES & THEMING
   =========================== */
:root {
    /* Light Mode Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #1a3a52;
    --text-secondary: #5a7a92;
    --navy: #4a6fa5;
    --gold: #d4af37;
    --navy-light: #6b8caf;
    --gold-light: #e8c968;
    --border-color: #e0e6ed;
    --shadow-sm: rgba(0, 0, 0, 0.05);
    --shadow-md: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);

    /* Typography */
    --font-serif: 'Merriweather', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;

    /* Layout */
    --container-max-width: 1200px;
    --profile-image-size: 200px;

    /* Berkeley Colors */
    --berkeley-blue: #003262;
    --berkeley-gold: #FDB515;
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --bg-primary: #2a2a2a;
    --bg-secondary: #1f1f1f;
    --text-primary: #e8e8e8;
    --text-secondary: #b8b8b8;
    --navy: #7da3d4;
    --gold: #f0d06e;
    --navy-light: #9bb8e0;
    --gold-light: #f5dc8c;
    --border-color: #404040;
    --shadow-sm: rgba(0, 0, 0, 0.2);
    --shadow-md: rgba(0, 0, 0, 0.3);
    --shadow-lg: rgba(0, 0, 0, 0.4);
}

/* ===========================
   VIEW TRANSITIONS
   =========================== */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

::view-transition-old(root) {
    z-index: 1;
}

::view-transition-new(root) {
    z-index: 2;
    animation: reveal-circle 0.4s ease-in-out;
}

@keyframes reveal-circle {
    from {
        clip-path: circle(0px at var(--theme-transition-x, 50%) var(--theme-transition-y, 50%));
    }
    to {
        clip-path: circle(var(--theme-transition-radius, 100vmax) at var(--theme-transition-x, 50%) var(--theme-transition-y, 50%));
    }
}

/* ===========================
   GLOBAL STYLES
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-sans);
    background: #ffd89b;
    background: -webkit-linear-gradient(to right, #19547b, #ffd89b);
    background: linear-gradient(to right, #19547b, #ffd89b);
    color: var(--text-primary);
    line-height: 1.6;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    opacity: 0.85;
    pointer-events: none;
    z-index: -1;
}

[data-theme="dark"] body {
    background: #ffd89b;
    background: -webkit-linear-gradient(to right, #0d3a56, #d4a75f);
    background: linear-gradient(to right, #0d3a56, #d4a75f);
}

[data-theme="dark"] body::before {
    opacity: 0.82;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    width: 100%;
    box-sizing: border-box;
}

/* ===========================
   THEME TOGGLE BUTTON
   =========================== */
.theme-toggle {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    z-index: 1000;
    box-shadow: 0 2px 8px var(--shadow-sm);
    opacity: 1;
    pointer-events: auto;
}

.theme-toggle.hidden {
    opacity: 0;
    pointer-events: none;
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px var(--shadow-md);
}

.theme-toggle svg {
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

.sun-icon {
    display: block;
}

.moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: none;
}

[data-theme="dark"] .moon-icon {
    display: block;
}

/* ===========================
   HERO SECTION
   =========================== */
.hero {
    padding: var(--space-3xl) 0;
    background: transparent;
    position: relative;
}

.hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-lg);
    position: relative;
    z-index: 1;
}

.profile-image {
    width: var(--profile-image-size);
    height: var(--profile-image-size);
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
    border: 4px solid var(--border-color);
    box-shadow: 0 8px 24px var(--shadow-md);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px var(--shadow-lg);
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.name {
    font-family: var(--font-serif);
    font-size: var(--text-5xl);
    font-weight: 700;
    line-height: 1.2;
}

/* .gradient-text {
    background: linear-gradient(135deg, var(--navy) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
} */

.description {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Desktop Layout */
@media (min-width: 769px) {
    .hero .container {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: var(--space-xl);
    }

    .hero-content {
        padding-top: 50px; /* tweak 6–14px until it lines up perfectly */
    }

    .description {
        max-width: 600px;
    }
}

/* ===========================
   SECTION STYLES
   =========================== */
section {
    padding: var(--space-2xl) 0;
}

.section-title {
    font-family: var(--font-serif);
    font-size: var(--text-4xl);
    color: rgba(26, 58, 82, 0.85);
    margin-bottom: var(--space-xl);
    text-align: center;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

[data-theme="dark"] .section-title {
    color: rgba(232, 232, 232, 0.9);
}

/* ===========================
   EMPLOYMENT SECTION
   =========================== */
.employment {
    background: transparent;
    position: relative;
}

.employment-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3xl);
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.employment-item {
    background: transparent;
    padding: 0;
    border: none;
    transition: all var(--transition-base);
    position: relative;
}

.employment-header {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.company-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 50%;
    background: var(--bg-secondary);
    padding: var(--space-sm);
    transition: all var(--transition-base);
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 12px var(--shadow-sm);
}

.employment-title-group {
    flex: 1;
    min-width: 250px;
}

.job-title {
    font-family: var(--font-serif);
    font-size: var(--text-2xl);
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    font-weight: 700;
    line-height: 1.3;
}

.company-name {
    font-size: var(--text-lg);
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    text-decoration: none;
    display: inline-block;
    transition: all var(--transition-base);
}

a.company-name:hover {
    transform: translateX(4px);
    filter: brightness(1.2);
}

.employment-dates {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.job-description {
    color: var(--text-secondary);
    line-height: 1.9;
    font-size: var(--text-base);
    padding-left: calc(80px + var(--space-lg));
    position: relative;
}

.job-description::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--gold) 0%, transparent 100%);
    opacity: 0.3;
    transition: opacity var(--transition-base);
}


/* Mobile adjustments for free-form layout */
@media (max-width: 768px) {
    .employment-item:hover {
        transform: none;
    }

    .job-description {
        padding-left: 0;
        margin-top: var(--space-md);
    }

    .job-description::before {
        display: none;
    }

    .education-item:hover {
        transform: none;
    }

    .courses-section {
        padding-left: 0;
        margin-top: var(--space-md);
    }

    .courses-section::before {
        display: none;
    }
}

/* ===========================
   EDUCATION SECTION
   =========================== */
.education {
    background: transparent;
    position: relative;
}

.education-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-3xl);
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.education-item {
    background: transparent;
    padding: 0;
    border: none;
    transition: all var(--transition-base);
    position: relative;
}

.education-header {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.school-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 50%;
    background: var(--bg-secondary);
    padding: var(--space-sm);
    transition: all var(--transition-base);
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 12px var(--shadow-sm);
}

.education-info {
    flex: 1;
    min-width: 250px;
}

.school-name {
    font-family: var(--font-serif);
    font-size: var(--text-2xl);
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    display: inline-block;
    transition: all var(--transition-base);
}

a.school-name {
    color: var(--text-primary);
}

a.school-name:hover {
    color: var(--navy);
    transform: translateX(4px);
}

.degree-info {
    font-size: var(--text-lg);
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.education-dates {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.courses-section {
    margin-top: var(--space-lg);
    padding-left: calc(120px + var(--space-lg));
    position: relative;
}

.courses-section::before {
    content: '';
    position: absolute;
    left: 60px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--navy) 0%, transparent 100%);
    opacity: 0.3;
    transition: opacity var(--transition-base);
}

.courses-title {
    font-family: var(--font-serif);
    font-size: var(--text-xl);
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    font-weight: 600;
}

.courses-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    line-height: 2;
}

.course-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

/* CS courses - Navy theme */
.course-item.cs-course {
    border: 1px solid var(--navy);
}

.course-item.cs-course .course-code {
    color: var(--navy);
    font-weight: 700;
}

/* EECS courses - Gold theme */
.course-item.eecs-course {
    border: 1px solid var(--gold);
}

.course-item.eecs-course .course-code {
    color: var(--gold);
    font-weight: 700;
}

.course-code {
    font-weight: 700;
    font-size: var(--text-xs);
    letter-spacing: 0.5px;
}

.course-name {
    color: var(--text-secondary);
    font-size: var(--text-xs);
    font-weight: 500;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 768px) {
    :root {
        --text-5xl: 2.25rem;
        --text-4xl: 1.875rem;
        --text-3xl: 1.5rem;
        --text-2xl: 1.25rem;
        --profile-image-size: 140px;
    }

    .container {
        padding: 0 var(--space-md);
        max-width: 100%;
    }

    .hero {
        padding: var(--space-2xl) 0;
    }

    section {
        padding: var(--space-xl) 0;
    }

    .theme-toggle {
        top: var(--space-md);
        right: var(--space-md);
        width: 40px;
        height: 40px;
    }

    .employment-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .employment-title-group {
        width: 100%;
        min-width: 0;
    }

    .education-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .education-info {
        width: 100%;
        min-width: 0;
    }

    .school-image {
        margin: 0 auto;
    }

    .courses-list {
        grid-template-columns: 1fr;
    }

    .name,
    .description,
    .job-title,
    .company-name,
    .school-name,
    .degree-info {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

@media (max-width: 480px) {
    :root {
        --text-5xl: 1.875rem;
        --text-4xl: 1.5rem;
        --profile-image-size: 120px;
        --space-md: 1rem;
        --space-lg: 1.25rem;
    }

    .container {
        padding: 0 1rem;
    }

    .employment-item,
    .education-content {
        padding: 0;
    }

    .company-logo {
        width: 60px;
        height: 60px;
    }

    .school-image {
        width: 100px;
        height: 100px;
    }
}

/* section:not(:first-of-type) {
    border-top: 1px solid var(--divider-color);
} */

section {
    padding: 4rem 0;
}

/* :root {
    --divider-color: rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] {
    --divider-color: rgba(255, 255, 255, 0.02);
} */

/* ===========================
   SOCIAL LINKS (HERO) — simplified + translucent
   =========================== */
   .social-links {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

@media (min-width: 769px) {
    .social-links {
        justify-content: flex-start;
    }
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;

    /* Transparent / subtle “chip” */
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(0, 0, 0, 0.06);

    /* very light depth */
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);

    /* optional glass feel (safe fallback if unsupported) */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
    text-decoration: none;
}

.social-link:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.09);
}

.social-link:active {
    transform: translateY(0px);
}

.social-link:focus-visible {
    outline: 2px solid rgba(74, 111, 165, 0.55); /* matches your navy vibe */
    outline-offset: 3px;
}

.social-icon {
    width: 18px;
    height: 18px;
    display: block;
    opacity: 0.85;
    transition: opacity var(--transition-fast);
}

.social-link:hover .social-icon {
    opacity: 1;
}

/* Dark theme tweaks */
[data-theme="dark"] .social-link {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .social-link:hover {
    background: rgba(255, 255, 255, 0.12);
}


/* ===========================
   FOOTER CONTACT
   =========================== */
   .footer-contact {
    padding: var(--space-xl) 0;
    margin-top: var(--space-2xl);
    border-top: 1px solid var(--border-color);
    background: transparent;
}

.footer-inner {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-headline {
    font-family: var(--font-serif);
    font-size: var(--text-lg);
    font-weight: 700;
    color: rgba(26, 58, 82, 0.75);
}

[data-theme="dark"] .footer-headline {
    color: rgba(232, 232, 232, 0.78);
}

.footer-subtext {
    margin-top: 6px;
    font-size: var(--text-sm);
    color: rgba(90, 122, 146, 0.85);
}

[data-theme="dark"] .footer-subtext {
    color: rgba(184, 184, 184, 0.85);
}

.footer-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

@media (max-width: 768px) {
    .footer-actions {
        align-items: flex-start;
    }
}

/* Contact links (icons) */
.contact-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.contact-link {
    width: auto;
    height: auto;

    /* remove pill background entirely */
    background: none;
    border: none;
    box-shadow: none;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 4px; /* small hit area */
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.contact-link:hover {
    transform: translateY(-1px);
    opacity: 0.85;
}

[data-theme="dark"] .contact-link {
    background: rgba(0, 0, 0, 0.18);
    border-color: rgba(232, 232, 232, 0.14);
    box-shadow: 0 1px 8px var(--shadow-sm);
}

[data-theme="dark"] .contact-link:hover {
    background: rgba(0, 0, 0, 0.28);
    border-color: rgba(232, 232, 232, 0.2);
    box-shadow: 0 3px 12px var(--shadow-md);
}

.contact-link:focus-visible {
    outline: 2px solid var(--navy);
    outline-offset: 3px;
}

.contact-icon {
    width: 23px;   /* increased from ~18–20px */
    height: 23px;
    display: block;
}

/* Obfuscated email styling */
.contact-email {
    font-size: var(--text-sm);
    color: rgba(90, 122, 146, 0.85);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

[data-theme="dark"] .contact-email {
    color: rgba(184, 184, 184, 0.85);
}

.email-chip {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.85rem;
    padding: 6px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
}

.contact-email a,
.contact-email a:visited {
    color: inherit;
}

.contact-email a:hover {
    color: inherit;
}