/* =====================================================
   Amit Tiwari — Portfolio
   Design system inspired by adamkhoury.com:
   dark tech theme, magenta + cyan accents, monospace
   tags, sharp-edged cards, circuit/hex motif in hero.
   ===================================================== */

:root {
    /* Fonts & layout */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --container-width: 1120px;
    --radius: 8px;

    /* The hero band always stays dark & neon, mirroring adamkhoury.com's fixed-dark header */
    --hero-accent: #ec8ffe;
    --hero-accent-2: #78d0f1;
    --hero-glow: 0 0 32px rgba(236, 143, 254, 0.4);
    --hero-glow-2: 0 0 32px rgba(120, 208, 241, 0.45);

    /* Dark theme (only theme) — adamkhoury.com inspired: dark tech bg, magenta + cyan neon accents */
    --bg: #202124;
    --bg-alt: #17171a;
    --text: #e2e2e4;
    --text-muted: #9a9a9a;
    --border: #3a3a40;
    --header-bg: rgba(15, 15, 17, 0.85);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);

    --accent: #ec8ffe;
    --accent-2: #78d0f1;
    --accent-dark: #f6c2ff;
    --accent-contrast: #111111;
    --accent-soft: rgba(236, 143, 254, 0.12);
    --accent-2-soft: rgba(120, 208, 241, 0.14);
    --glow: 0 0 28px rgba(236, 143, 254, 0.35);
    --glow-2: 0 0 28px rgba(120, 208, 241, 0.4);
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    margin: 0;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.kicker {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-2);
    margin: 0 0 10px;
}

.section-title {
    text-align: center;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    margin-bottom: 48px;
    color: var(--text);
}

.section-title span {
    color: var(--accent);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

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

.btn-primary:hover {
    background: var(--accent-dark);
    box-shadow: var(--glow);
}

.btn-outline {
    background: transparent;
    color: var(--accent-2);
    border-color: var(--accent-2);
    font-family: var(--font-mono);
    backdrop-filter: blur(6px);
}

.btn-outline:hover {
    background: var(--accent-2);
    color: var(--accent-contrast);
    box-shadow: var(--glow-2);
}

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.2s ease;
}

.site-header.scrolled {
    box-shadow: var(--shadow);
}

.nav-wrap {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    display: inline-flex;
    align-items: center;
    margin-left: -10px;
}

.logo-icon {
    width: 62px;
    height: 62px;
    padding: 7px;
    /* logo1.png is light-colored art on a transparent background (designed for adamkhoury.com's always-dark header), so give it a permanent dark chip to stay legible in light mode too */
    background: #111111;
    border-radius: 14px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
    transform: scale(1.06);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.nav-links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    margin: 6px 8px;
    padding: 8px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: color 0.3s ease, transform 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    border: 1px solid var(--accent-2);
    box-shadow: var(--glow-2);
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-2);
    transform: translateY(-2px);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    opacity: 1;
    transform: scale(1);
}

.nav-links a i {
    margin-right: 7px;
    font-size: 1rem;
    color: var(--accent-2);
    transition: transform 0.3s ease;
}

.nav-links a:hover i,
.nav-links a.active i {
    transform: scale(1.15) rotate(-8deg);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: -10px;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1.1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.icon-btn i {
    display: inline-block;
    transition: transform 0.3s ease;
}

.icon-btn:hover {
    background: var(--border);
    color: var(--accent-2);
    box-shadow: 0 0 14px var(--accent-2-soft);
}

.icon-btn:hover i {
    transform: rotate(15deg);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 64px;
    background: #111111;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath d='M28 0 L56 14.5 L56 43.5 L28 58 L0 43.5 L0 14.5 Z' fill='none' stroke='%2378d0f1' stroke-opacity='0.18' stroke-width='1'/%3E%3C/svg%3E");
    color: #f0f0f0;
}

.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 560px;
}

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

.hero-inner > * {
    animation: fadeInUp 0.8s ease both;
}

.hero-inner > *:nth-child(1) { animation-delay: 0s; }
.hero-inner > *:nth-child(2) { animation-delay: 0.1s; }
.hero-inner > *:nth-child(3) { animation-delay: 0.2s; }
.hero-inner > *:nth-child(4) { animation-delay: 0.3s; }
.hero-inner > *:nth-child(5) { animation-delay: 0.4s; }
.hero-inner > *:nth-child(6) { animation-delay: 0.5s; }

@keyframes floatPhoto {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-photo {
    width: 190px;
    height: 190px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--hero-accent-2);
    box-shadow: 0 0 0 6px rgba(120, 208, 241, 0.15), var(--hero-glow-2);
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease both, floatPhoto 5s ease-in-out 1s infinite;
}

.hero-eyebrow {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--hero-accent-2);
}

.hero h1 {
    font-size: clamp(2.2rem, 6vw, 3.4rem);
    margin: 8px 0;
    color: #ffffff;
}

.hero-role {
    margin: 0 0 28px;
    font-size: 1.2rem;
    color: var(--hero-accent);
}

.hero .btn-primary {
    background: var(--hero-accent-2);
    color: #0a1a1f;
}

.hero .btn-primary:hover {
    background: #9adcf5;
    box-shadow: var(--hero-glow-2);
}

.social-links {
    display: flex;
    gap: 20px;
    margin-top: 32px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.hero .social-links a {
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
}

.hero .social-links a:hover {
    background: rgba(120, 208, 241, 0.25);
    transform: translateY(-3px);
    box-shadow: var(--hero-glow-2);
}

.social-links img {
    width: 28px;
    height: 28px;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.social-links a:hover img {
    opacity: 1;
}

.hero .social-links img {
    filter: invert(1);
}

/* ---------- About ---------- */
.about {
    padding: 96px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 56px;
    align-items: center;
}

.about-photo {
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.about-photo:hover {
    transform: scale(1.02);
    border-color: var(--accent-2);
    box-shadow: var(--glow-2);
}

.about-content p {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-top: 0;
}

.about-facts {
    margin: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.about-facts li {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fact-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-2-soft);
    color: var(--accent-2);
    font-size: 0.9rem;
}

.about-facts a {
    color: var(--accent-2);
    font-weight: 600;
}

.about-facts a:hover {
    text-decoration: underline;
}

.resume-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* ---------- Experience ---------- */
.experience {
    padding: 96px 0;
    background: var(--bg-alt);
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 32px;
    border-left: 2px solid var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 40px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -39px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-2);
    box-shadow: 0 0 0 4px var(--accent-2-soft);
}

.timeline-item:first-child .timeline-marker {
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft), var(--glow);
}

.timeline-content {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    transition: transform 0.25s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}

.timeline-content:hover {
    transform: translateY(-4px);
    border-color: var(--accent-2);
    box-shadow: var(--glow-2);
}

.timeline-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
}

.timeline-head h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    color: var(--text);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-2);
    white-space: nowrap;
}

.timeline-company {
    margin: 4px 0 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.timeline-list li {
    position: relative;
    padding-left: 18px;
}

.timeline-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-2);
}

@media (max-width: 560px) {
    .timeline {
        padding-left: 24px;
    }

    .timeline-marker {
        left: -31px;
    }
}

/* ---------- Skills ---------- */
.skills {
    padding: 96px 0;
    background: var(--bg-alt);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.skill-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 12px;
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.skill-item:hover {
    transform: translateY(-4px);
    border-color: var(--accent-2);
    box-shadow: var(--glow-2);
}

.skill-item img {
    height: 56px;
    width: auto;
    margin: 0 auto 12px;
    transition: transform 0.3s ease;
}

.skill-item i {
    display: block;
    height: 56px;
    line-height: 56px;
    font-size: 44px;
    margin: 0 auto 12px;
    color: var(--accent-2);
    transition: transform 0.3s ease;
}

.skill-item:hover img,
.skill-item:hover i {
    transform: scale(1.1);
}

.skill-item p {
    margin: 0;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.85rem;
}

/* ---------- Projects ---------- */
.projects {
    padding: 96px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.projects-subtitle {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 24px;
    padding-left: 14px;
    border-left: 4px solid var(--accent-2);
}

.projects-grid + .projects-subtitle {
    margin-top: 64px;
}

.project-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-2);
    box-shadow: var(--glow-2);
}

.project-image {
    position: relative;
    display: block;
    height: 170px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.06);
}

.project-image--icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-alt), var(--border));
}

.project-image--icon i {
    font-size: 2.3rem;
    color: var(--accent-2);
    transition: transform 0.35s ease;
}

.project-image--light {
    background: linear-gradient(135deg, #eef2f5, #dce6ec);
}

.project-image--light i {
    color: #1c2b36;
}

.project-card:hover .project-image--icon i {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(120, 208, 241, 0.92), rgba(236, 143, 254, 0.88));
    color: #0a0a0a;
    font-family: var(--font-mono);
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid var(--accent-2);
    color: var(--accent-2);
}

.tag-accent {
    border-color: var(--accent);
    color: var(--accent);
}

.project-body h3 {
    font-size: 1.15rem;
    color: var(--accent-2);
}

.project-body p {
    color: var(--text-muted);
    font-size: 0.95rem;
    flex: 1;
}

.project-body .btn {
    align-self: flex-start;
}

.project-note {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-family: var(--font-body);
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ---------- Education & Awards ---------- */
.education {
    padding: 96px 0;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 950px));
    justify-content: center;
    gap: 32px;
}

.education-card {
    position: relative;
    overflow: hidden;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: transform 0.25s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}

.education-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-2);
    box-shadow: var(--glow-2);
}

.education-watermark {
    position: absolute;
    right: -10px;
    bottom: -20px;
    font-size: 8rem;
    line-height: 1;
    color: var(--accent-2);
    opacity: 0.05;
    z-index: -1;
    pointer-events: none;
}

.education-top {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}

.education-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-2-soft);
    color: var(--accent-2);
    font-size: 1.5rem;
}

.education-degree {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}

.education-major {
    margin: 2px 0 0;
    color: var(--accent-2);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.education-facts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid var(--border);
    padding-top: 18px;
}

.education-facts li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.education-facts li i {
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    color: var(--accent-2);
}

/* ---------- Hobby ---------- */
.hobby {
    padding: 96px 0;
}

.hobby-card {
    position: relative;
    overflow: hidden;
    max-width: 950px;
    margin: 0 auto;
    text-align: center;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px 32px;
    transition: transform 0.25s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}

.hobby-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Auto-injected by particles.js on cards listed in the miniFieldTargets selector */
.has-star-field {
    position: relative;
    overflow: hidden;
}

.mini-star-field {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.hobby-watermark {
    position: absolute;
    line-height: 1;
    color: var(--accent-2);
    opacity: 0.07;
    z-index: -1;
    pointer-events: none;
    animation: hobbyWatermarkFloat 6s ease-in-out infinite;
}

.hobby-watermark--bottom-left {
    left: 16px;
    bottom: 4px;
    font-size: 9rem;
    animation-name: hobbyWatermarkFloatFlipped;
}

.hobby-watermark--bottom-right {
    right: 16px;
    bottom: 4px;
    font-size: 9rem;
    animation-delay: -3s;
}

.hobby-watermark--top-left {
    left: 24px;
    top: 8px;
    font-size: 4.5rem;
    animation-name: hobbyWatermarkFloatFlipped;
    animation-delay: -1.5s;
}

.hobby-watermark--top-right {
    right: 24px;
    top: 8px;
    font-size: 4.5rem;
    animation-delay: -4.5s;
}

@keyframes hobbyWatermarkFloat {
    0%, 100% { transform: translateY(0) rotate(-6deg); }
    50% { transform: translateY(-14px) rotate(6deg); }
}

@keyframes hobbyWatermarkFloatFlipped {
    0%, 100% { transform: scaleX(-1) translateY(0) rotate(-6deg); }
    50% { transform: scaleX(-1) translateY(-14px) rotate(6deg); }
}

.hobby-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-2);
    box-shadow: var(--glow-2);
}

.hobby-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 20px;
}

.hobby-icons-label {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.hobby-icons i {
    font-size: 1.8rem;
    color: var(--accent-2);
    transition: transform 0.3s ease;
}

.hobby-icons i:nth-child(even) {
    color: var(--accent);
}

.hobby-card:hover .hobby-icons i {
    transform: translateY(-6px);
}

.hobby-icons i:nth-child(2) { transition-delay: 0.05s; }
.hobby-icons i:nth-child(3) { transition-delay: 0.1s; }
.hobby-icons i:nth-child(4) { transition-delay: 0.15s; }
.hobby-icons i:nth-child(5) { transition-delay: 0.2s; }
.hobby-icons i:nth-child(6) { transition-delay: 0.25s; }

.hobby-card p {
    color: var(--text-muted);
    margin: 0 0 24px;
}

/* ---------- Footer ---------- */
.site-footer {
    padding: 40px 0;
    text-align: center;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

.site-footer a {
    color: var(--accent-2);
    font-weight: 600;
}

.site-footer .social-links {
    justify-content: center;
    margin-top: 16px;
}

.site-footer .social-links a {
    padding: 10px;
    background: var(--accent-2-soft);
}

.site-footer .social-links a:hover {
    transform: translateY(-3px);
    background: var(--accent-2);
    box-shadow: var(--glow-2);
}

.site-footer .social-links img {
    filter: invert(1);
}

/* ---------- Back to top ---------- */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: var(--accent-2);
    color: #0a1a1f;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, background-color 0.2s ease, box-shadow 0.2s ease;
    z-index: 90;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ---------- Photo lightbox ---------- */
.hero-photo-btn {
    display: block;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    animation: none;
}

.photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.photo-lightbox.open {
    opacity: 1;
    visibility: visible;
}

.photo-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 12, 0.88);
    backdrop-filter: blur(6px);
}

.photo-lightbox-frame {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    border-radius: 20px;
    box-shadow: var(--hero-glow-2), 0 30px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.85);
    transition: transform 0.3s ease;
}

.photo-lightbox.open .photo-lightbox-frame {
    transform: scale(1);
}

.photo-lightbox-frame img {
    display: block;
    width: 100%;
    border-radius: 12px;
    border: 3px solid rgba(255, 255, 255, 0.9);
}

.photo-lightbox-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-alt);
    color: var(--text);
    border: 2px solid var(--accent-2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: var(--glow-2);
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.photo-lightbox-close:hover {
    background: var(--accent-2);
    color: var(--accent-contrast);
    transform: scale(1.1) rotate(90deg);
}

body.lightbox-open {
    overflow: hidden;
}

/* ---------- Gallery modal ---------- */
.gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 190;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-modal.open {
    opacity: 1;
    visibility: visible;
}

.gallery-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 12, 0.88);
    backdrop-filter: blur(6px);
}

.gallery-modal-frame {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 640px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 32px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--hero-glow-2), 0 30px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.gallery-modal.open .gallery-modal-frame {
    transform: scale(1);
}

.gallery-modal-title {
    margin: 0 0 20px;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    color: var(--text);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.gallery-thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    padding: 0;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumb:hover {
    transform: translateY(-3px);
    border-color: var(--accent-2);
    box-shadow: var(--glow-2);
}

.gallery-modal-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-alt);
    color: var(--text);
    border: 2px solid var(--accent-2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: var(--glow-2);
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.gallery-modal-close:hover {
    background: var(--accent-2);
    color: var(--accent-contrast);
    transform: scale(1.1) rotate(90deg);
}

.back-to-top:hover {
    background: var(--accent);
    box-shadow: var(--glow);
}

/* ---------- Scroll reveal ---------- */
.section-title,
.about-grid,
.skill-item,
.project-card,
.timeline-item,
.education-card,
.hobby-card {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-title.in-view,
.about-grid.in-view,
.skill-item.in-view,
.project-card.in-view,
.timeline-item.in-view,
.education-card.in-view,
.hobby-card.in-view {
    opacity: 1;
    transform: translateY(0);
}

.skills-grid .skill-item:nth-child(3n+2) { transition-delay: 0.08s; }
.skills-grid .skill-item:nth-child(3n+3) { transition-delay: 0.16s; }

.projects-grid .project-card:nth-child(2) { transition-delay: 0.1s; }
.projects-grid .project-card:nth-child(3) { transition-delay: 0.2s; }
.projects-grid .project-card:nth-child(4) { transition-delay: 0.3s; }

.timeline-item:nth-child(2) { transition-delay: 0.08s; }
.timeline-item:nth-child(3) { transition-delay: 0.16s; }
.timeline-item:nth-child(4) { transition-delay: 0.24s; }

.education-grid .education-card:nth-child(2) { transition-delay: 0.1s; }

/* ---------- Section Connector ---------- */
/* A vertical thread + pulsing node runs through each section's own top edge, so consecutive sections read as one connected chain */
.about,
.experience,
.skills,
.projects,
.education,
.hobby,
.site-footer {
    position: relative;
}

.experience::before,
.skills::before,
.projects::before,
.education::before,
.hobby::before,
.site-footer::before {
    content: '';
    position: absolute;
    /* starts below the kicker + section title so the thread never runs through heading text */
    top: 220px;
    bottom: 0;
    left: 50%;
    width: 3px;
    border-radius: 3px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, var(--accent-2), var(--accent), var(--accent-2));
    background-size: 100% 200%;
    opacity: 0.35;
    box-shadow: 0 0 10px var(--accent-2-soft), 0 0 20px var(--accent-soft);
    z-index: -1;
    pointer-events: none;
    animation: connectorLineFlow 5s linear infinite;
}

@keyframes connectorLineFlow {
    0% { background-position: 0 0%; }
    100% { background-position: 0 200%; }
}

/* About's 2-column layout has no safe centered gap, so its dot only gets a short stub instead of a full line */
.about::before {
    content: '';
    position: absolute;
    top: -7px;
    height: 56px;
    left: 50%;
    width: 3px;
    border-radius: 3px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, var(--accent-2), var(--accent), var(--accent-2));
    background-size: 100% 200%;
    opacity: 0.35;
    box-shadow: 0 0 10px var(--accent-2-soft), 0 0 20px var(--accent-soft);
    z-index: -1;
    pointer-events: none;
    animation: connectorLineFlow 5s linear infinite;
}

.about::after,
.experience::after,
.skills::after,
.projects::after,
.education::after,
.hobby::after,
.site-footer::after {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    width: 14px;
    height: 14px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: var(--accent-2);
    z-index: -1;
    pointer-events: none;
    animation: sectionNodePulseBg 3s ease-in-out infinite;
}

.experience::after,
.skills::after,
.site-footer::after {
    animation-name: sectionNodePulseBgAlt;
}

.experience::after { animation-delay: 0.3s; }
.skills::after { animation-delay: 0.6s; }
.projects::after { animation-delay: 0.9s; }
.education::after { animation-delay: 1.2s; }
.hobby::after { animation-delay: 1.5s; }
.site-footer::after { animation-delay: 1.8s; }

@keyframes sectionNodePulseBg {
    0%, 100% { box-shadow: 0 0 0 5px var(--bg), 0 0 14px var(--accent-2); }
    50% { box-shadow: 0 0 0 5px var(--bg), 0 0 22px var(--accent-2); }
}

@keyframes sectionNodePulseBgAlt {
    0%, 100% { box-shadow: 0 0 0 5px var(--bg-alt), 0 0 14px var(--accent-2); }
    50% { box-shadow: 0 0 0 5px var(--bg-alt), 0 0 22px var(--accent-2); }
}

/* ---------- Selection & scrollbar ---------- */
::selection {
    background: var(--accent-2);
    color: #0a1a1f;
}

html {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-2) var(--bg);
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-2);
    border-radius: 10px;
}

/* ---------- Accessible focus states ---------- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-photo {
        width: 260px;
        margin: 0 auto;
    }

    .about-facts {
        align-items: center;
    }

    .resume-actions {
        justify-content: center;
    }

    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

    .hero-photo {
        width: 170px;
        height: 170px;
    }

    .nav-wrap {
        position: relative;
    }

    .logo {
        position: absolute;
        top: 50%;
        left: 50%;
        margin: 0;
        transform: translate(-50%, -50%);
    }

    .nav-actions {
        margin-left: auto;
    }

    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--bg-alt);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 24px;
        transform: translateY(-150%);
        opacity: 0;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

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

    .nav-links a {
        margin: 0;
        padding: 14px 8px;
        border: none;
        border-bottom: 1px solid var(--border);
        border-radius: 0;
    }

    .nav-links a:last-child {
        border-bottom: none;
    }
}

@media (max-width: 560px) {
    .nav-wrap {
        padding: 0 16px;
    }

    .experience,
    .education,
    .hobby {
        padding: 64px 0;
    }

    .hobby-icons {
        gap: 10px;
    }

    .hobby-icons i,
    .hobby-icons-label {
        font-size: 1.3rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .hobby-card {
        padding: 36px 20px;
    }

    .hobby-watermark--bottom-left,
    .hobby-watermark--bottom-right {
        font-size: 6rem;
    }

    .hobby-watermark--top-left,
    .hobby-watermark--top-right {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .hero-photo {
        width: 150px;
        height: 150px;
    }

    .about,
    .skills,
    .projects {
        padding: 64px 0;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hobby-watermark--top-left,
    .hobby-watermark--top-right {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-photo,
    .hero-inner > *,
    .hobby-watermark,
    .about::before,
    .about::after,
    .experience::before,
    .experience::after,
    .skills::before,
    .skills::after,
    .projects::before,
    .projects::after,
    .education::before,
    .education::after,
    .hobby::before,
    .hobby::after,
    .site-footer::before,
    .site-footer::after {
        animation: none !important;
    }

    .section-title,
    .about-grid,
    .skill-item,
    .project-card {
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
