/* ===================================
   CSS VARIABLES & THEME
   =================================== */

:root {
    /* Colors */
    --color-primary: #0f172a;
    --color-secondary: #1e293b;
    --color-accent: #0891b2;
    --color-accent-dark: #0e7490;
    --color-bg: #ffffff;
    --color-bg-light: #fafbfc;
    --color-text: #1e293b;
    --color-text-light: #64748b;
    --color-text-lighter: #94a3b8;
    --color-border: #e2e8f0;
    --color-shadow: rgba(15, 23, 42, 0.08);

    /* Typography */
    --font-display: 'Crimson Text', serif;
    --font-body: 'Geist', sans-serif;

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

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Transitions */
    --transition-base: 200ms ease;
}

/* ===================================
   RESET & BASE STYLES
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-text);
    background: linear-gradient(135deg, #f8faff 0%, #eef4fb 40%, #f0f9ff 70%, #fafbfc 100%);
    background-attachment: fixed;
    overflow-x: hidden;
}

.navbar,
.section,
.hero .container,
.divider {
    position: relative;
    z-index: 1;
}

.navbar {
    z-index: 1000;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    line-height: 1.2;
    font-weight: 600;
}

h1 { font-size: 3.25rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1rem; }
h4 { font-size: 0.875rem; }

p {
    margin-bottom: var(--spacing-md);
    font-size: 0.9375rem;
    line-height: 1.7;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--color-accent-dark);
}

/* ===================================
   LAYOUT UTILITIES
   =================================== */

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

.section {
    scroll-margin-top: 60px;
    min-height: 100vh;
    padding: var(--spacing-4xl) 0;
    background-color: rgba(255, 255, 255, 0.55);
    display: flex;
    align-items: center;
}

.section > .container {
    width: 100%;
}

.section-subtitle {
    display: block;
    font-size: 0.75rem;
    color: var(--color-accent);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: var(--spacing-2xl);
}

.section-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-2xl);
    color: var(--color-primary);
    font-weight: 600;
    position: relative;
    padding-bottom: var(--spacing-md);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 3px;
    background: var(--color-accent);
    border-radius: 2px;
}

.divider {
    height: 1px;
    background: var(--color-border);
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-lg);
    }

    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 0.95rem; }

    .section {
        padding: var(--spacing-3xl) 0;
    }
}

/* ===================================
   NAVIGATION
   =================================== */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 1px 3px var(--color-shadow);
}

.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color var(--transition-base);
}

.nav-logo:hover {
    color: var(--color-accent);
}

.nav-links {
    display: flex;
    gap: var(--spacing-2xl);
    align-items: center;
}

.nav-links a {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color var(--transition-base);
}

.nav-links a:hover {
    color: var(--color-accent);
}

@media (max-width: 768px) {
    .nav-links {
        gap: var(--spacing-lg);
    }

    .nav-links a {
        font-size: 0.7rem;
    }
}

/* ===================================
   HERO SECTION
   =================================== */

.hero {
    scroll-margin-top: 60px;
    background: rgba(255, 255, 255, 0.55);
    min-height: calc(100vh - 60px);
    padding: var(--spacing-4xl) 0;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

#kg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

#hero-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    align-items: center;
    gap: 0;
}

.hero-text {
    display: flex;
    flex-direction: column;
    padding-right: var(--spacing-2xl);
}

.hero-photo-wrap {
    position: absolute;
    top: 0;
    right: 0;
    width: 44%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    clip-path: polygon(18% 0%, 100% 0%, 100% 100%, 0% 100%);
}

.hero-photo-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20%;
    background: linear-gradient(to bottom, transparent 0%, rgba(255,255,255,0.65) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

@media (max-width: 768px) {
    .hero-layout {
        grid-template-columns: 1fr;
    }

    .hero-photo-wrap {
        position: relative;
        width: 100%;
        height: 260px;
        clip-path: polygon(0% 12%, 100% 0%, 100% 100%, 0% 100%);
    }
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3.25rem;
    line-height: 1.1;
    margin-bottom: var(--spacing-lg);
    color: var(--color-primary);
    font-weight: 600;
    max-width: 500px;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-2xl);
    line-height: 1.8;
    max-width: 580px;
}

.hero-accent {
    color: var(--color-accent);
    font-weight: 600;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    margin-top: var(--spacing-3xl);
}

.hero-stat {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    padding: var(--spacing-lg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    text-align: center;
    transition: all var(--transition-base);
}

.hero-stat:hover {
    border-color: var(--color-accent);
    box-shadow: 0 4px 12px var(--color-shadow);
}

.hero-stat-num {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: var(--spacing-xs);
}

.hero-stat-text {
    font-size: 0.75rem;
    color: var(--color-text-light);
    font-weight: 500;
    letter-spacing: 0.3px;
}

@media (max-width: 768px) {
    .hero {
        padding: var(--spacing-3xl) 0;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

/* ===================================
   EXPERTISE SECTION
   =================================== */

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-2xl);
}

.expertise-item {
    position: relative;
    padding-bottom: var(--spacing-md);
}

.expertise-item h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    font-weight: 600;
}

.expertise-item h3::before {
    content: '';
    display: block;
    width: 32px;
    height: 2px;
    background: var(--color-accent);
    margin-bottom: var(--spacing-md);
}

.expertise-item p {
    color: var(--color-text-light);
    font-size: 0.9375rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .expertise-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   EXPERIENCE SECTION
   =================================== */

.experience-list {
    max-width: 700px;
}

.exp-item {
    margin-bottom: var(--spacing-3xl);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.exp-company-wrap {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.exp-logo {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 4px;
    border: 1px solid var(--color-border);
    flex-shrink: 0;
    display: block;
}

.exp-company {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--color-primary);
    font-weight: 600;
}

.exp-current {
    font-size: 0.75rem;
    color: var(--color-accent);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.exp-date {
    font-size: 0.75rem;
    color: var(--color-text-lighter);
}

.exp-role {
    color: var(--color-accent);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: var(--spacing-md);
}

.exp-desc {
    font-size: 0.9375rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

.exp-link {
    color: var(--color-accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-base);
}

.exp-link:hover {
    border-bottom-color: var(--color-accent);
}

@media (max-width: 768px) {
    .exp-header {
        flex-direction: column;
    }

    .exp-current, .exp-date {
        margin-top: var(--spacing-xs);
    }
}

/* ===================================
   EDUCATION SECTION
   =================================== */

.education-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-2xl);
}

.education-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    overflow: hidden;
}

.education-img-wrap {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.education-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.education-card:hover .education-img {
    transform: scale(1.04);
}

.education-card > *:not(.education-img-wrap) {
    padding-left: var(--spacing-xl);
    padding-right: var(--spacing-xl);
}

.education-card > .degree-type { padding-top: var(--spacing-lg); }
.education-card > .date        { padding-bottom: var(--spacing-xl); }

.education-card:hover {
    box-shadow: 0 4px 12px var(--color-shadow);
}

.degree-type {
    font-size: 0.75rem;
    color: var(--color-accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: var(--spacing-md);
}

.education-card h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    font-weight: 600;
}

.institution {
    color: var(--color-accent);
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: var(--spacing-xs);
}

.education-card .date {
    color: var(--color-text-lighter);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .education-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   CTA SECTION
   =================================== */

.cta-section {
    padding: var(--spacing-4xl) 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    text-align: center;
}

.cta-section h2 {
    font-family: var(--font-display);
    font-size: 2.25rem;
    margin-bottom: var(--spacing-md);
    color: white;
}

.cta-section > .container > p {
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--spacing-2xl);
    font-size: 0.95rem;
}

.cta-links {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-2xl);
}

.location {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* ===================================
   BUTTONS
   =================================== */

.btn {
    display: inline-block;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-primary {
    background-color: var(--color-accent);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-accent-dark);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 1px solid white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--color-primary);
}

/* ===================================
   FOOTER
   =================================== */

.footer {
    background-color: var(--color-primary);
    color: rgba(255, 255, 255, 0.6);
    padding: var(--spacing-2xl) 0;
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
}

.footer p {
    margin-bottom: var(--spacing-sm);
}

.footer p:last-child {
    margin-bottom: 0;
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

section {
    animation: fadeIn 0.6s ease-out;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */

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

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
    .navbar,
    .footer,
    .cta-section {
        display: none;
    }

    body {
        font-size: 12pt;
    }
}
