/* ===== DESIGN SYSTEM — Premium Professional ===== */

:root {
    /* Colors – Light */
    --bg: #ffffff;
    --bg-secondary: #f8f9fc;
    --text: #111111;
    --text-secondary: #4a5568;
    --text-tertiary: #888888;
    --border: #e2e8f0;
    --border-light: #f0f0f0;
    --accent: #4f46e5;
    --accent-hover: #4338ca;
    --accent-light: rgba(79, 70, 229, 0.08);
    --accent-glow: rgba(79, 70, 229, 0.25);
    --gradient-start: #4f46e5;
    --gradient-end: #7c3aed;
    --link: #111111;
    --link-hover: #4f46e5;
    --card-bg: #ffffff;
    --card-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 6px rgba(0,0,0,0.04);
    --card-shadow-hover: 0 20px 60px rgba(79, 70, 229, 0.1), 0 8px 24px rgba(0,0,0,0.06);
    --tag-bg: #f0f0ff;
    --tag-text: #4f46e5;
    --nav-bg: rgba(255,255,255,0.9);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg: #09090b;
    --bg-secondary: #111114;
    --text: #f0f0f5;
    --text-secondary: #a0a0b0;
    --text-tertiary: #666677;
    --border: #1e1e2e;
    --border-light: #161622;
    --accent: #818cf8;
    --accent-hover: #a5b4fc;
    --accent-light: rgba(129, 140, 248, 0.1);
    --accent-glow: rgba(129, 140, 248, 0.3);
    --gradient-start: #818cf8;
    --gradient-end: #a78bfa;
    --link: #f0f0f5;
    --link-hover: #818cf8;
    --card-bg: #12121a;
    --card-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 6px rgba(0,0,0,0.2);
    --card-shadow-hover: 0 20px 60px rgba(129, 140, 248, 0.08), 0 8px 24px rgba(0,0,0,0.3);
    --tag-bg: #1a1a2e;
    --tag-text: #a0a0cc;
    --nav-bg: rgba(9,9,11,0.9);
}

/* ===== RESET ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    transition: background-color var(--transition-slow), color var(--transition-slow);
    overflow-x: hidden;
}

.skip-link {
    position: absolute;
    top: -48px;
    left: 16px;
    z-index: 3000;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--text);
    color: var(--bg);
    font-size: 0.875rem;
    font-weight: 600;
    transition: top var(--transition);
}

.skip-link:focus-visible {
    top: 12px;
    color: var(--bg);
}

a {
    color: var(--link);
    text-decoration: none;
    transition: color var(--transition), opacity var(--transition);
}

a:hover {
    color: var(--link-hover);
}

ul { list-style: none; }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, textarea, select {
    font-family: inherit;
    border: none;
    outline: none;
    background: none;
}

button { cursor: pointer; }

::selection {
    background-color: var(--accent-light);
    color: var(--accent);
}

[data-theme="dark"] ::selection {
    background-color: var(--accent-light);
    color: var(--accent);
}

/* ===== CONTAINER ===== */
.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 32px;
}

.section {
    padding: 80px 0;
}

#blog.section {
    padding-top: 24px;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    transition: background-color var(--transition-slow);
}

.navbar.scrolled {
    border-bottom-color: var(--border);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .navbar.scrolled {
    box-shadow: 0 1px 0 var(--border), 0 8px 30px rgba(0, 0, 0, 0.4);
}

.nav-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-logo {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.03em;
    transition: opacity var(--transition);
}

.nav-logo:hover {
    opacity: 0.7;
    color: var(--text);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 8px;
    transition: color var(--transition), background-color var(--transition);
}

.nav-link:hover {
    color: var(--text);
    background-color: var(--tag-bg);
}

.nav-link.active {
    color: var(--accent);
}

.theme-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: all var(--transition);
    background: transparent;
}

.theme-btn:hover {
    background-color: var(--tag-bg);
    color: var(--text);
}

.menu-toggle {
    display: none;
    width: 36px;
    height: 36px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    border-radius: 8px;
    cursor: pointer;
}

.menu-toggle:hover { background-color: var(--tag-bg); }

.menu-toggle .bar {
    display: block;
    width: 18px;
    height: 1.5px;
    background-color: var(--text);
    border-radius: 2px;
    transition: all var(--transition);
}

.menu-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ===== HERO ===== */
.hero {
    padding: 140px 0 80px;
}

.hero-layout {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 60px;
}

.hero-text {
    flex: 1;
    max-width: 560px;
}

.hero-title {
    font-family: 'Newsreader', Georgia, serif;
    font-size: clamp(2.5rem, 5vw, 3.25rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.04em;
    color: var(--text);
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.hero-description {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-tertiary);
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.hero-cta {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #ffffff;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 10px;
    transition: all var(--transition);
    box-shadow: 0 4px 15px var(--accent-glow);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
    color: #ffffff;
    filter: brightness(1.1);
}

.hero-resume {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition);
}

.hero-resume:hover {
    color: var(--text);
}

.hero-image {
    flex-shrink: 0;
}

.hero-photo {
    width: 250px;
    height: 250px;
    border-radius: var(--radius-xl);
    object-fit: cover;
    cursor: zoom-in;
    filter: grayscale(10%);
    transition: filter var(--transition-slow), transform var(--transition-slow), box-shadow var(--transition-slow);
    border: 3px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 0 0 3px var(--accent-light), 0 8px 32px rgba(0,0,0,0.12);
}

.hero-photo:hover {
    filter: grayscale(0%);
    transform: scale(1.03);
    box-shadow: 0 0 0 3px var(--accent-glow), 0 12px 40px rgba(0,0,0,0.15);
}

/* ===== SECTION HEADERS ===== */
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 32px;
}

.section-title {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text);
}

.section-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent);
    transition: all var(--transition);
    white-space: nowrap;
}

.section-link:hover {
    color: var(--accent-hover);
    letter-spacing: 0.02em;
}

/* ===== WHY HIRE ME ===== */
.hire-section {
    padding-top: 32px;
}

.hire-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.hire-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.hire-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.hire-card-text {
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.hire-card-text:last-child {
    margin-bottom: 0;
}

.hire-list {
    list-style: disc;
    margin-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hire-list li {
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

.hire-proof-card {
    background: linear-gradient(145deg, var(--bg-secondary) 0%, var(--card-bg) 100%);
    border-color: var(--border);
}

.hire-metrics {
    display: grid;
    gap: 14px;
}

.hire-metric {
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 12px 14px;
    background: var(--card-bg);
}

.hire-metric-number {
    display: block;
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--text);
    margin-bottom: 6px;
}

.hire-metric-label {
    display: block;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--text-tertiary);
}

/* ===== BLOG LIST ===== */
.blog-list {
    display: flex;
    flex-direction: column;
}

.blog-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
    transition: all var(--transition);
}

.blog-item:first-child {
    border-top: 1px solid var(--border-light);
}

.blog-item:hover {
    padding-left: 12px;
    color: var(--accent);
    border-bottom-color: var(--accent-light);
}

.blog-item-title {
    font-size: 0.9375rem;
    font-weight: 500;
}

.blog-item-meta {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    font-weight: 400;
    flex-shrink: 0;
    margin-left: 20px;
}

/* ===== MY STORY SECTION ===== */
.story-section {
    padding-top: 120px;
}

.story-title {
    font-family: 'Newsreader', Georgia, serif;
    font-size: clamp(2.25rem, 5vw, 3rem);
    font-weight: 700;
    font-style: italic;
    letter-spacing: -0.03em;
    color: var(--text);
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.2;
}

.story-hero-image {
    width: 100%;
    max-width: 700px;
    margin: 0 auto 48px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.story-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
    transition: transform var(--transition-slow);
}

.story-photo:hover {
    transform: scale(1.02);
}

.story-content {
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 640px;
    margin: 0 auto;
}

.story-lead {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 400;
    font-style: italic;
    line-height: 1.65;
    color: var(--text);
    letter-spacing: -0.01em;
}

.story-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.story-body p {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.story-body strong {
    color: var(--text);
    font-weight: 600;
}

.story-highlights {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 12px;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
}

.story-highlight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.highlight-number {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.highlight-label {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* ===== PROJECTS GRID ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-6px);
    border-color: var(--accent-light);
}

/* Featured card spans full width with side-by-side layout */
.project-featured {
    border-left: none;
}

.project-featured .project-card-image {
    height: 100%;
    min-height: unset;
}

.project-featured .project-card-title {
    font-size: 1.25rem;
}

.project-card-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    cursor: zoom-in;
    background: var(--bg-secondary);
    transition: transform var(--transition-slow);
    display: block;
}

.project-card:hover .project-card-image {
    transform: scale(1.04);
}

/* Image Wrapper (needed for badge overlay positioning) */
.project-card-image-wrap {
    position: relative;
    overflow: hidden;
    background: var(--bg-secondary);
}

/* Badge pill on card image */
.project-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    pointer-events: none;
    z-index: 2;
    backdrop-filter: blur(4px);
}

/* ===== IMAGE LIGHTBOX ===== */
.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-slow);
    padding: 24px;
}

.image-lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-image {
    max-width: min(100%, 1000px);
    max-height: min(100vh - 80px, 100%);
    width: auto;
    height: auto;
    border-radius: var(--radius-lg);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: background var(--transition);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.project-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-card-title {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: var(--text);
}

.project-card-desc {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--text-tertiary);
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.project-card-tags span {
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 4px 10px;
    background: var(--tag-bg);
    color: var(--tag-text);
    border-radius: 6px;
    letter-spacing: -0.01em;
}

.project-card-links {
    display: flex;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.project-card-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color var(--transition);
}

.project-card-link:hover {
    color: var(--accent);
}

.project-card-link i {
    font-size: 0.75rem;
}

/* ===== EXPERIENCE LIST ===== */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.exp-item {
    padding: 24px 0;
    border-bottom: 1px solid var(--border-light);
}

.exp-item:first-child {
    border-top: 1px solid var(--border-light);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.exp-role {
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.01em;
    background: var(--accent-light);
    padding: 4px 12px;
    border-radius: 6px;
    border-left: 3px solid var(--accent);
    display: inline-block;
}

.exp-company {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.exp-date {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 20px;
}

.exp-desc {
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

.exp-subheading {
    font-size: 0.8125rem;
    color: var(--text);
    font-weight: 600;
    margin-top: 12px;
    margin-bottom: 6px;
}

.exp-bullets {
    margin: 0 0 10px;
    padding-left: 18px;
    list-style: disc;
}

.exp-bullets li {
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.exp-bullets li a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.exp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.exp-tags span {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 12px;
    background: var(--tag-bg);
    color: var(--tag-text);
    border-radius: 6px;
}

/* ===== SKILLS GRID ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 28px;
}

.skill-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skill-group-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.skill-tag {
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 6px 14px;
    background: var(--tag-bg);
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all var(--transition);
}

.skill-tag:hover {
    background: var(--accent-light);
    color: var(--accent);
    box-shadow: 0 2px 8px var(--accent-glow);
}

/* ===== CERTIFICATIONS SECTION ===== */
.certifications-list {
    display: grid;
    gap: 16px;
}

.cert-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    transition: all var(--transition);
}

.cert-item:hover {
    border-color: var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.cert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.cert-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.cert-issuer {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    white-space: nowrap;
}

/* ===== ACHIEVEMENTS SECTION ===== */
.achievements-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.achievement-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    display: flex;
    gap: 16px;
    transition: all var(--transition);
    align-items: flex-start;
}

.achievement-item:hover {
    border-color: var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.achievement-icon {
    font-size: 2rem;
    flex-shrink: 0;
    line-height: 1;
}

.achievement-content {
    flex: 1;
}

.achievement-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px 0;
}

.achievement-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    padding-bottom: 40px;
}

.contact-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 72px 56px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
}

.contact-heading {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 16px;
}

.contact-description {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto 32px;
}

.contact-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.contact-email {
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: #ffffff;
    border-radius: 10px;
    transition: all var(--transition);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.contact-email:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
    color: #ffffff;
    filter: brightness(1.1);
}

.contact-resume-link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition);
}

.contact-resume-link:hover {
    color: var(--text);
}

/* ===== FOOTER ===== */
.footer {
    padding: 32px 0;
    border-top: 1px solid var(--border-light);
}

/* ===== BOOKS SECTION ===== */
.books-section {
    padding-bottom: 60px;
}

.books-intro {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 640px;
    margin-bottom: 40px;
}

.books-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: 780px;
}

.book-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.book-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--gradient-start), var(--gradient-end));
}

.book-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-4px);
    border-color: var(--accent-light);
}

.book-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 0;
    cursor: pointer;
    padding: 4px 0;
    user-select: none;
    transition: opacity var(--transition);
}

.book-card-header:hover {
    opacity: 0.8;
}

.book-card-header:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 8px;
}

.book-chevron {
    margin-left: auto;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), color var(--transition);
    flex-shrink: 0;
    margin-top: 6px;
}

.book-card.open .book-chevron {
    transform: rotate(180deg);
    color: var(--accent);
}

/* Collapsible notes wrapper */
.book-notes {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
    opacity: 0;
}

.book-card.open .book-notes {
    max-height: 800px;
    opacity: 1;
    margin-top: 24px;
}

.book-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.book-title {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.book-author {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    font-style: italic;
}

.book-lessons {
    margin-bottom: 24px;
}

.book-lessons-heading {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 14px;
}

.book-lesson-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.book-lesson-list li {
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--text-secondary);
    padding-left: 20px;
    position: relative;
}

.book-lesson-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.book-lesson-list li strong {
    color: var(--text);
    font-weight: 600;
}

.book-takeaway {
    background: var(--accent-light);
    border-radius: var(--radius);
    padding: 20px;
    border-left: 3px solid var(--accent);
}

.book-takeaway-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin-bottom: 8px;
}

.book-takeaway p {
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copy {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.footer-socials a {
    color: var(--text-tertiary);
    font-size: 1rem;
    transition: color var(--transition);
}

.footer-socials a:hover {
    color: var(--text);
}

/* ===== HOW I THINK / PHILOSOPHY ===== */
.philosophy-section {
    padding-top: 24px;
    padding-bottom: 40px;
}

.philosophy-content {
    max-width: 640px;
    border-left: 3px solid var(--accent);
    padding-left: 28px;
}

.philosophy-heading {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.philosophy-text {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.philosophy-text:last-child {
    margin-bottom: 0;
}

/* ===== PROJECT CONSTRAINT STORIES ===== */
.project-constraint-story {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.constraint-row {
    display: flex;
    gap: 10px;
    font-size: 0.8125rem;
    line-height: 1.55;
}

.constraint-label {
    flex-shrink: 0;
    width: 72px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
    padding-top: 2px;
}

.constraint-value {
    color: var(--text-secondary);
    flex: 1;
}

.constraint-numbers .constraint-value {
    color: var(--accent);
    font-weight: 600;
}

/* ===== FEATURED PROJECT ===== */
.project-featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--border);
    background: linear-gradient(145deg, var(--bg-secondary) 0%, var(--card-bg) 100%);
    position: relative;
    overflow: hidden;
}

.project-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--gradient-start), var(--gradient-end));
    z-index: 1;
}

.project-featured .project-card-image-wrap {
    height: 100%;
    min-height: 280px;
}

.project-featured .project-card-image {
    height: 100%;
    min-height: 280px;
}

.project-featured .project-card-body {
    padding: 28px;
}

.project-featured .project-card-title {
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.project-featured .project-card-desc {
    -webkit-line-clamp: unset;
    line-clamp: unset;
}

.project-featured .project-card-badge {
    font-size: 0.75rem;
    padding: 5px 12px;
}


/* ===== ABOUT SECTION ===== */
.about-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.about-text {
    max-width: 720px;
}

.about-text p {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-text strong {
    color: var(--text);
    font-weight: 600;
}

.about-subsection-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

/* ===== NAV RESUME LINK ===== */
.nav-resume-link {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 6px;
    font-weight: 600;
    color: #ffffff !important;
}

.nav-resume-link:hover {
    filter: brightness(1.1);
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
}

/* ===== HERO SECONDARY CTA ===== */
.hero-secondary-cta {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color var(--transition);
}

.hero-secondary-cta:hover {
    color: var(--text);
}

.hero-secondary-cta i {
    font-size: 0.875rem;
}

.hero-cta i {
    margin-right: 4px;
    font-size: 0.8125rem;
}

.hero-hiring {
    margin-bottom: 8px;
}

/* ===== FOOTER RESUME LINK ===== */
.footer-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-resume-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-tertiary);
    transition: color var(--transition);
}

.footer-resume-link:hover {
    color: var(--text);
}

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll-triggered animations */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */

/* Extra-large desktop */
@media screen and (min-width: 1400px) {
    .container, .nav-container {
        max-width: 1200px;
    }

    .hero { padding: 180px 0 120px; }

    .hero-title { font-size: 3.75rem; }

    .hero-photo {
        width: 260px;
        height: 260px;
    }

    .hero-layout {
        gap: 80px;
    }

    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 28px;
    }

    .skills-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .section { padding: 100px 0; }

    .story-hero-image {
        max-width: 900px;
    }

    .story-content {
        max-width: 720px;
    }
}

/* Large desktop */
@media screen and (min-width: 1200px) and (max-width: 1399px) {
    .container, .nav-container {
        max-width: 1080px;
    }

    .hero { padding: 160px 0 100px; }

    .hero-title { font-size: 3.5rem; }

    .hero-photo {
        width: 240px;
        height: 240px;
    }

    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }

    .skills-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .story-highlights {
        gap: 32px;
    }
}

/* Medium desktop */
@media screen and (min-width: 769px) and (max-width: 1199px) {
    .container, .nav-container {
        max-width: 900px;
    }

    .hero-photo {
        width: 200px;
        height: 200px;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .project-featured {
        grid-column: 1 / -1;
    }

    .project-featured .project-card-image-wrap {
        min-height: 200px;
    }

    .project-featured .project-card-image {
        min-height: 200px;
    }
}

/* Tablet */
@media screen and (max-width: 768px) {
    body.mobile-menu-open {
        overflow: hidden;
    }

    .container, .nav-container {
        padding: 0 20px;
    }

    .section { padding: 60px 0; }

    .hero { padding: 120px 0 60px; }

    .hero-layout {
        flex-direction: column-reverse;
        gap: 32px;
        align-items: flex-start;
    }

    .hero-photo {
        width: 128px;
        height: 128px;
        border-radius: var(--radius-lg);
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .menu-toggle { display: flex; }

    .nav-menu {
        position: fixed;
        top: 64px;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: var(--nav-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 16px 20px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-link {
        display: block;
        padding: 12px 16px;
        font-size: 1rem;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-featured {
        grid-template-columns: 1fr;
    }

    .project-featured .project-card-image-wrap {
        min-height: 180px;
    }

    .project-featured .project-card-image {
        min-height: 180px;
    }

    .philosophy-content {
        padding-left: 20px;
    }

    .constraint-row {
        flex-direction: column;
        gap: 2px;
    }

    .constraint-label {
        width: auto;
    }

    .contact-card {
        padding: 40px 24px;
    }

    .contact-heading {
        font-size: 1.5rem;
    }

    .exp-header {
        flex-direction: column;
        gap: 4px;
    }

    .exp-date {
        margin-left: 0;
        white-space: normal;
    }

    .blog-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .blog-item-meta {
        margin-left: 0;
    }

    /* My Story tablet */
    .section.story-section {
        padding-top: 132px;
        padding-bottom: 60px;
    }

    .story-title {
        font-size: 1.9rem;
        margin-bottom: 24px;
        line-height: 1.25;
    }

    .story-hero-image {
        margin-bottom: 36px;
    }

    .story-lead {
        font-size: 1.125rem;
    }

    .story-highlights {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

}

/* Small mobile */
@media screen and (max-width: 480px) {
    .container, .nav-container {
        padding: 0 16px;
    }

    .hero { padding: 100px 0 48px; }

    .hero-title {
        font-size: 1.875rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 0.875rem;
    }

    .hero-photo {
        width: 112px;
        height: 112px;
        border-radius: var(--radius);
    }

    .hero-image {
        align-self: center;
        margin: 0 auto;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .hero-cta {
        font-size: 0.875rem;
        padding: 10px 20px;
    }

    .hero-resume {
        font-size: 0.875rem;
    }

    .section { padding: 48px 0; }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.375rem;
    }

    .contact-card {
        padding: 32px 20px;
    }

    .contact-actions {
        flex-direction: column;
        gap: 12px;
    }

    .contact-heading {
        font-size: 1.375rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .section-header-row {
        flex-direction: column;
        gap: 8px;
    }

    /* Philosophy mobile */
    .philosophy-content {
        padding-left: 16px;
    }

    .philosophy-heading {
        font-size: 1.125rem;
    }

    .philosophy-text {
        font-size: 0.875rem;
    }

    /* About mobile */
    .about-text p {
        font-size: 0.875rem;
    }

    /* Project cards mobile polish */
    .project-card-body {
        padding: 16px;
    }

    .project-card-image {
        height: 160px;
    }

    .project-card-tags span {
        font-size: 0.625rem;
        padding: 3px 8px;
    }

    /* Experience mobile */
    .exp-item {
        padding: 20px 0;
    }

    .exp-role {
        font-size: 0.875rem;
    }

    .exp-desc {
        font-size: 0.8125rem;
    }

    /* My Story mobile */
    .section.story-section {
        padding-top: 124px;
        padding-bottom: 48px;
    }

    .story-title {
        font-size: 1.5rem;
        margin-bottom: 18px;
        line-height: 1.28;
    }

    .story-hero-image {
        margin-bottom: 20px;
        border-radius: var(--radius-lg);
    }

    .story-lead {
        font-size: 0.975rem;
        line-height: 1.55;
    }

    .story-body p {
        font-size: 0.875rem;
        line-height: 1.65;
    }

    .story-highlights {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .highlight-number {
        font-size: 1.625rem;
    }

    .highlight-label {
        font-size: 0.75rem;
    }

    /* Constraint stories mobile */
    .constraint-row {
        flex-direction: column;
        gap: 2px;
    }

    .constraint-label {
        width: auto;
    }

    /* Featured project mobile — already stacked from tablet CSS */
    .project-featured {
        grid-template-columns: 1fr;
    }

    .project-featured .project-card-image-wrap {
        min-height: 160px;
    }

    .project-featured .project-card-image {
        min-height: 160px;
    }

    .project-featured .project-card-body {
        padding: 16px;
    }

    .project-featured .project-card-title {
        font-size: 1.0625rem;
    }

    /* Nav mobile */
    .nav-logo {
        font-size: 1rem;
    }

    .image-lightbox {
        padding: 12px;
    }

    .lightbox-image {
        max-height: min(100vh - 56px, 100%);
        border-radius: var(--radius);
    }

    .lightbox-close {
        top: 10px;
        right: 12px;
        width: 36px;
        height: 36px;
        font-size: 1.75rem;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .fade-in,
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}

/* Dark mode auto-detect */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #09090b;
        --bg-secondary: #111114;
        --text: #f0f0f5;
        --text-secondary: #a0a0b0;
        --text-tertiary: #666677;
        --border: #1e1e2e;
        --border-light: #161622;
        --accent: #818cf8;
        --accent-hover: #a5b4fc;
        --accent-light: rgba(129, 140, 248, 0.1);
        --accent-glow: rgba(129, 140, 248, 0.3);
        --gradient-start: #818cf8;
        --gradient-end: #a78bfa;
        --link: #f0f0f5;
        --link-hover: #818cf8;
        --card-bg: #12121a;
        --card-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 6px rgba(0,0,0,0.2);
        --card-shadow-hover: 0 20px 60px rgba(129, 140, 248, 0.08), 0 8px 24px rgba(0,0,0,0.3);
        --tag-bg: #1a1a2e;
        --tag-text: #a0a0cc;
        --nav-bg: rgba(9,9,11,0.9);
    }
}

/* Focus styles */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Safe area insets */
@supports (padding: max(0px)) {
    .nav-container {
        padding-left: max(24px, env(safe-area-inset-left));
        padding-right: max(24px, env(safe-area-inset-right));
    }
}