/* ===== CSS Variables ===== */
:root {
    --bg-primary: #050507;
    --bg-secondary: #0a0a10;
    --bg-card: #111118;
    --bg-card-hover: #161622;
    --text-primary: #e8e8ec;
    --text-secondary: #9a9aaa;
    --text-muted: #555566;
    --border-color: #1e1e2a;
    --border-hover: #2a2a40;
    --accent-1: #00d4aa;
    --accent-2: #00b4d8;
    --accent-gradient: linear-gradient(135deg, #00d4aa, #00b4d8);
    --gradient-text: linear-gradient(135deg, #00d4aa, #00b4d8);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(0, 212, 170, 0.15);
    --shadow-glow-strong: 0 0 60px rgba(0, 212, 170, 0.2);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 100px;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    --nav-height: 72px;
    --max-width: 1100px;
    --section-gap: 80px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(0, 212, 170, 0.25);
    color: #fff;
}

/* ===== Container ===== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 32px;
}

/* ===== Navigation ===== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(5, 5, 7, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-base), border-color var(--transition-base);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--nav-height);
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: inline-flex;
    align-items: center;
}

.nav-logo span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: var(--accent-gradient);
    border-radius: 50%;
    color: var(--bg-primary);
    font-weight: 800;
    font-size: 1rem;
    margin-right: 1px;
    flex-shrink: 0;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-base);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 36px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
    padding: 4px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-base);
    border-radius: 1px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--nav-height);
    position: relative;
    overflow: hidden;
}

/* Letter particles background (genkou.ru effect) */
.hero-letters-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.letter-particle {
    position: absolute;
    font-family: var(--font-mono);
    color: rgba(0, 212, 170, 0.12);
    font-weight: 700;
    transition: color 0.3s ease;
    pointer-events: none;
    user-select: none;
}

/* Split-screen hero layout */
.hero-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 100%;
}

/* Large photo on left */
.hero-photo {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    max-width: 450px;
}

.hero-photo::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 20px;
    background: var(--accent-gradient);
    z-index: -1;
    filter: blur(12px);
    opacity: 0.5;
}

.hero-photo::after {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 24px;
    border: 2px solid rgba(0, 212, 170, 0.15);
    z-index: -1;
    animation: hero-pulse 3s ease-in-out infinite;
}

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

@keyframes hero-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.02);
        opacity: 0;
    }
}

/* Text content on right */
.hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-1);
    background: rgba(0, 212, 170, 0.08);
    border: 1px solid rgba(0, 212, 170, 0.2);
    padding: 7px 20px;
    border-radius: var(--radius-full);
    margin-bottom: 2rem;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero-text h1 {
    font-size: clamp(2.75rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.05;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 32px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--bg-primary);
    box-shadow: 0 4px 16px rgba(0, 212, 170, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 6px 24px rgba(0, 212, 170, 0.35);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-1);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

/* ===== Sections ===== */
section {
    padding: var(--section-gap) 0;
}

section:nth-child(even) {
    background: var(--bg-secondary);
}

/* Section headers */
.section-header {
    text-align: center;
    margin-bottom: 72px;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-1);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-family: var(--font-mono);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.section-divider {
    width: 48px;
    height: 3px;
    background: var(--accent-gradient);
    margin: 0 auto;
    border-radius: 2px;
}

/* ===== Stats ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 36px 24px;
    text-align: center;
    transition: all var(--transition-base);
}

.stat-card:hover {
    border-color: rgba(0, 212, 170, 0.3);
    box-shadow: var(--shadow-glow);
    transform: translateY(-4px);
}

.stat-number {
    font-size: 2.75rem;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    line-height: 1.2;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
}

/* ===== Skills ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 28px;
    transition: all var(--transition-base);
}

.skill-category:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.skill-category-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--accent-1);
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
}

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

.skill-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(0, 212, 170, 0.08);
    border: 1px solid rgba(0, 212, 170, 0.15);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.skill-tag:hover {
    background: rgba(0, 212, 170, 0.15);
    color: var(--text-primary);
    border-color: rgba(0, 212, 170, 0.3);
}

/* ===== Timeline ===== */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 48px;
}

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

.timeline-dot {
    position: absolute;
    left: -40px;
    top: 8px;
    width: 12px;
    height: 12px;
    background: var(--accent-gradient);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--bg-primary), var(--shadow-glow);
}

.timeline-period {
    font-size: 0.85rem;
    color: var(--accent-1);
    font-family: var(--font-mono);
    font-weight: 600;
    margin-bottom: 6px;
}

.timeline-role {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.timeline-company {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-bottom: 14px;
}

.timeline-desc {
    list-style: none;
    padding: 0;
}

.timeline-desc li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: #9a9aaa;
    font-size: 0.92rem;
    line-height: 1.6;
}

.timeline-desc li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-1);
    font-weight: 700;
}

/* ===== Projects ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 36px 32px;
    transition: all var(--transition-base);
}

.project-card:hover {
    border-color: rgba(0, 212, 170, 0.3);
    box-shadow: var(--shadow-glow);
    transform: translateY(-4px);
}

.project-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.project-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

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

.project-stack span {
    padding: 4px 10px;
    background: rgba(0, 212, 170, 0.08);
    border: 1px solid rgba(0, 212, 170, 0.15);
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-1);
    font-family: var(--font-mono);
}

/* ===== Hardware ===== */
.hardware-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.hardware-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 28px;
    display: flex;
    flex-direction: column;
    transition: all var(--transition-base);
}

.hardware-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.hardware-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--accent-1);
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hardware-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 14px;
    flex-grow: 1;
}

.hardware-link {
    color: var(--accent-1);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.hardware-link:hover {
    color: var(--text-primary);
    transform: translateX(4px);
}

/* ===== Education ===== */
.edu-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.edu-block {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 28px 32px;
    transition: all var(--transition-base);
}

.edu-block:hover {
    border-color: var(--border-hover);
}

.edu-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.edu-degree {
    font-size: 1.05rem;
    font-weight: 700;
}

.edu-year {
    font-size: 0.8rem;
    color: var(--accent-1);
    font-family: var(--font-mono);
    font-weight: 600;
    flex-shrink: 0;
}

.edu-school {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.edu-thesis {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    font-style: italic;
}

.edu-courses {
    list-style: none;
    padding: 0;
}

.edu-courses li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.edu-courses li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-1);
}

/* ===== Contact ===== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 700px;
    margin: 0 auto;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-base);
}

.contact-link:hover {
    border-color: var(--accent-1);
    box-shadow: var(--shadow-glow-strong);
    transform: translateY(-3px);
    background: var(--bg-card-hover);
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid rgba(0, 212, 170, 0.2);
    border-radius: var(--radius-md);
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.contact-link:hover .contact-icon {
    background: rgba(0, 212, 170, 0.15);
    border-color: rgba(0, 212, 170, 0.35);
    transform: scale(1.05);
}

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

.contact-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}

.contact-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 700px;
    margin: 0 auto 40px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-submit {
    text-align: center;
}

/* Form feedback messages */
.form-success {
    display: none;
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-top: 1.5rem;
}

.form-success.show {
    display: block;
    animation: fadeInUp 0.5s ease;
}

.form-success-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.form-success h3 {
    color: var(--accent);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.form-success p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.form-error {
    display: none;
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid #ff4757;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin-top: 1.5rem;
}

.form-error.show {
    display: block;
    animation: fadeInUp 0.5s ease;
}

.form-error h3 {
    color: #ff4757;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.form-error p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Form loading state */
.form-loading .btn-primary {
    opacity: 0.7;
    pointer-events: none;
}

.btn-primary.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Phone input formatting */
input[type="tel"]:invalid,
input[type="email"]:invalid {
    border-color: #ff4757;
}

input[type="tel"]:valid,
input[type="email"]:valid {
    border-color: var(--accent);
}

.privacy-link {
    color: var(--accent-1);
    text-decoration: underline;
    transition: color var(--transition-fast);
}

.privacy-link:hover {
    color: var(--text-primary);
}

/* ===== Footer ===== */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 36px 0;
    text-align: center;
}

footer p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: underline;
    font-size: 0.8rem;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--accent-1);
}

/* ===== Privacy Modal ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    overflow-y: auto;
}

.modal.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 700px;
    width: 100%;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition-fast);
}

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

.modal-content h2 {
    font-size: 1.5rem;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.modal-content h3 {
    font-size: 1.1rem;
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--accent-1);
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}

.modal-content ul {
    margin-left: 20px;
    margin-bottom: 12px;
}

.modal-content ul li {
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.5;
}

/* ===== Scroll Animations ===== */
.fade-in {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
}

.fade-in.animate-on-scroll.visible {
    opacity: 1;
    transform: none;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .fade-in {
        opacity: 1;
        transform: none;
    }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

@media (max-width: 768px) {
    :root {
        --section-gap: 80px;
        --max-width: 100%;
    }

    .container {
        padding: 0 20px;
    }

    nav .container {
        flex-wrap: wrap;
        height: auto;
        padding: 14px 20px;
    }

    .nav-toggle {
        display: flex;
        order: 3;
    }

    .nav-links {
        flex-direction: column;
        gap: 0;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-links.open {
        display: flex;
        max-height: 300px;
        margin-top: 12px;
    }

    .nav-links li {
        padding: 10px 0;
    }

    .nav-logo {
        order: 1;
    }

    .nav-links a {
        font-size: 1rem;
        padding: 10px 0;
    }

    /* Hero mobile */
    .hero-layout {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-photo {
        max-width: 300px;
        margin: 0 auto;
    }

    .hero-text {
        align-items: center;
    }

    .hero-subtitle {
        max-width: 100%;
    }

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

    .hero h1 {
        font-size: 2.25rem;
        letter-spacing: -1px;
    }

    .hero-eyebrow {
        font-size: 0.7rem;
        padding: 6px 14px;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
        padding: 14px 24px;
    }

    .section-header {
        margin-bottom: 48px;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .stats-grid,
    .skills-grid,
    .projects-grid,
    .hardware-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        gap: 16px;
    }

    .stat-card {
        padding: 24px 20px;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form-wrapper {
        padding: 24px;
    }

    .timeline {
        padding-left: 30px;
    }

    .timeline-dot {
        left: -30px;
    }

    .modal-content {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .contact-form-wrapper {
        padding: 20px;
    }

    .modal-content {
        padding: 20px;
    }
}