:root {
    --bg: #090909;
    --bg-soft: #0d1321;
    --surface: rgba(255, 255, 255, 0.08);
    --surface-strong: rgba(255, 255, 255, 0.14);
    --surface-border: rgba(255, 255, 255, 0.18);
    --text: #f8fbff;
    --text-soft: #b8d8f0;
    --accent: #00bfff;
    --accent-2: #00e5ff;
    --accent-3: #7dd3fc;
    --success: #31f29b;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    --glow: 0 0 25px rgba(0, 191, 255, 0.35);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
    --container: min(1180px, calc(100% - 32px));
    --nav-height: 88px;
}

body.light-mode {
    --bg: #e7f7ff;
    --bg-soft: #dff1ff;
    --surface: rgba(255, 255, 255, 0.6);
    --surface-strong: rgba(255, 255, 255, 0.9);
    --surface-border: rgba(0, 90, 140, 0.15);
    --text: #07111a;
    --text-soft: #37586f;
    --accent: #008ec7;
    --accent-2: #00a6d8;
    --accent-3: #5a91ff;
    --success: #0b8d5b;
    --shadow: 0 18px 45px rgba(0, 83, 126, 0.12);
    --glow: 0 0 20px rgba(0, 166, 216, 0.22);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Poppins", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(0, 191, 255, 0.2), transparent 32%),
        radial-gradient(circle at top right, rgba(0, 229, 255, 0.12), transparent 24%),
        radial-gradient(circle at bottom center, rgba(125, 211, 252, 0.12), transparent 34%),
        linear-gradient(130deg, #05070d, #08111d 40%, #091421 72%, #07080c);
    background-size: 180% 180%;
    animation: animatedBackground 18s ease infinite;
    overflow-x: hidden;
}

body.light-mode {
    background:
        radial-gradient(circle at top left, rgba(0, 191, 255, 0.2), transparent 35%),
        radial-gradient(circle at bottom right, rgba(126, 214, 255, 0.22), transparent 35%),
        linear-gradient(130deg, #f4fbff, #dcf5ff 45%, #ecfbff 100%);
}

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

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

button,
input,
textarea {
    font: inherit;
}

#particle-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.8;
}

.site-shell {
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.9s ease, transform 0.9s ease;
}

.site-shell.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.loader {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(2, 7, 16, 0.94);
    backdrop-filter: blur(24px);
    z-index: 30;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.terminal-shell {
    width: min(760px, 100%);
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid rgba(110, 196, 255, 0.2);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    background: rgba(6, 11, 24, 0.88);
}

.terminal-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.04);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-title {
    margin-left: 8px;
    color: #a8e9ff;
    font-size: 0.95rem;
}

.terminal-body {
    padding: 28px;
    color: #dbf8ff;
    font-family: "Courier New", monospace;
}

.terminal-line,
.terminal-success,
.progress-lines p,
.terminal-role {
    margin: 0 0 12px;
}

.progress-lines p {
    opacity: 0;
    transform: translateY(10px);
    animation: terminalLineIn 0.35s ease forwards;
}

.progress-lines p:nth-child(1) { animation-delay: 0.3s; }
.progress-lines p:nth-child(2) { animation-delay: 0.8s; }
.progress-lines p:nth-child(3) { animation-delay: 1.3s; }
.progress-lines p:nth-child(4) { animation-delay: 1.8s; }

.terminal-success {
    margin-top: 20px;
    color: #31f29b;
}

.terminal-name {
    margin: 12px 0 10px;
    font-size: clamp(1.9rem, 4vw, 3rem);
    color: #ffffff;
    text-shadow: 0 0 20px rgba(0, 191, 255, 0.4);
}

.terminal-role {
    color: #98e7ff;
    font-size: 1.05rem;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: var(--container);
    min-height: var(--nav-height);
    margin: 18px auto 0;
    padding: 14px 20px;
    border: 1px solid transparent;
    border-radius: 26px;
    transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.navbar.scrolled {
    background: rgba(9, 9, 9, 0.65);
    border-color: var(--surface-border);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

body.light-mode .navbar.scrolled {
    background: rgba(255, 255, 255, 0.68);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand strong {
    display: block;
    font-size: 1rem;
}

.brand small {
    display: block;
    color: var(--text-soft);
}

.brand-logo {
    position: relative;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.3), rgba(0, 229, 255, 0.06));
    border: 1px solid rgba(128, 224, 255, 0.22);
    box-shadow: var(--glow);
    overflow: hidden;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-text {
    display: none;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.brand-logo.logo-fallback .logo-text {
    display: inline;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-button,
.primary-button,
.secondary-button,
.menu-toggle {
    position: relative;
    overflow: hidden;
}

.nav-button,
.primary-button,
.secondary-button {
    border: 1px solid rgba(154, 216, 255, 0.2);
    border-radius: 999px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-button:hover,
.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 191, 255, 0.5);
    background: rgba(0, 191, 255, 0.12);
    box-shadow: var(--glow);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.menu-toggle {
    display: none;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 1px solid var(--surface-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    cursor: pointer;
}

.menu-toggle span {
    position: absolute;
    left: 14px;
    width: 24px;
    height: 2px;
    background: currentColor;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle span:nth-child(1) { top: 17px; }
.menu-toggle span:nth-child(2) { top: 24px; }
.menu-toggle span:nth-child(3) { top: 31px; }

.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

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

.section-heading {
    max-width: 740px;
    margin-bottom: 34px;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(0, 191, 255, 0.12);
    border: 1px solid rgba(0, 191, 255, 0.24);
    color: var(--accent-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    font-weight: 600;
}

.section-heading h2 {
    margin: 18px 0 14px;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.1;
}

.section-heading p,
.hero-description,
.info-panel p,
.project-card p,
.map-placeholder p,
.easter-egg-card p {
    color: var(--text-soft);
    line-height: 1.75;
}

.hero {
    padding-top: 64px;
    min-height: calc(100vh - 80px);
    display: grid;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 380px 1fr;
    align-items: center;
    gap: 44px;
}

.glass-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

body.light-mode .glass-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.54));
}

.hero-avatar {
    padding: 30px;
    display: grid;
    justify-items: center;
    gap: 22px;
}

.avatar-ring {
    width: min(290px, 100%);
    aspect-ratio: 1;
    padding: 12px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 30% 30%, rgba(0, 229, 255, 0.8), transparent 40%),
        linear-gradient(135deg, rgba(0, 191, 255, 0.28), rgba(255, 255, 255, 0.08));
    box-shadow: 0 0 0 1px rgba(163, 236, 255, 0.2), 0 0 50px rgba(0, 191, 255, 0.28);
}

.profile-photo,
.profile-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    object-fit: cover;
}

.profile-fallback {
    display: none;
    place-items: center;
    background:
        radial-gradient(circle at 30% 20%, rgba(0, 229, 255, 0.34), transparent 40%),
        linear-gradient(180deg, #07101b, #101e34);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #ffffff;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.24);
    color: var(--text-soft);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 0 rgba(49, 242, 155, 0.7);
    animation: pulse 1.8s infinite;
}

.hero-text h1 {
    margin: 12px 0 10px;
    font-size: clamp(2.3rem, 6vw, 5rem);
    line-height: 0.96;
    letter-spacing: 0.03em;
}

.hero-text h2 {
    margin: 0 0 18px;
    color: var(--accent-3);
    font-weight: 500;
    font-size: clamp(1.1rem, 2.6vw, 1.5rem);
}

.eyebrow {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.24);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.78rem;
    color: #c7f5ff;
}

.typing-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    margin-bottom: 16px;
    font-size: 1.08rem;
}

.typing-label {
    color: var(--text-soft);
}

.typing-text {
    color: var(--accent-2);
    font-weight: 600;
    text-shadow: 0 0 14px rgba(0, 229, 255, 0.25);
}

.typing-cursor {
    color: var(--accent-2);
    animation: blink 0.8s infinite;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.primary-button {
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.32), rgba(0, 229, 255, 0.18));
    box-shadow: var(--glow);
}

.secondary-button {
    background: rgba(255, 255, 255, 0.04);
}

.about-grid,
.contact-grid {
    display: grid;
    gap: 24px;
}

.about-grid {
    grid-template-columns: 1.2fr 0.9fr;
}

.info-panel,
.data-card,
.contact-card,
.map-card {
    padding: 28px;
}

.info-panel h3,
.data-card h3,
.contact-card h3,
.map-card h3 {
    margin-top: 0;
    font-size: 1.5rem;
}

.check-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
    padding: 0;
    margin: 24px 0;
    list-style: none;
}

.check-list li {
    position: relative;
    padding-left: 30px;
    color: var(--text);
}

.check-list li::before {
    content: "✔";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--success);
}

.about-quote {
    margin-bottom: 0;
    padding-left: 18px;
    border-left: 3px solid rgba(0, 191, 255, 0.45);
}

.data-list {
    display: grid;
    gap: 14px;
}

.data-row {
    display: grid;
    gap: 8px;
    padding: 15px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.data-row span {
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-soft);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.skill-item {
    padding: 22px;
}

.skill-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.progress-track {
    position: relative;
    width: 100%;
    height: 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.progress-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 18px rgba(0, 191, 255, 0.35);
    transition: width 1.4s cubic-bezier(.2, .8, .2, 1);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.project-card {
    padding: 26px;
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.project-card:hover,
.gallery-card:hover,
.social-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 191, 255, 0.35);
    box-shadow: 0 18px 40px rgba(0, 191, 255, 0.16);
}

.project-card i,
.contact-item i,
.social-card i,
.map-placeholder i {
    font-size: 1.8rem;
    color: var(--accent-2);
    text-shadow: 0 0 18px rgba(0, 229, 255, 0.3);
}

.project-card h3,
.gallery-card span,
.social-card span {
    margin: 18px 0 10px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.gallery-card {
    padding: 0;
    border: 1px solid var(--surface-border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    cursor: pointer;
    color: var(--text);
    box-shadow: var(--shadow);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.gallery-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.gallery-card span {
    display: block;
    padding: 16px 18px 18px;
    font-weight: 600;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 14px;
}

.social-card {
    padding: 22px 14px;
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 12px;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.social-card:hover i {
    filter: drop-shadow(0 0 14px rgba(0, 229, 255, 0.52));
}

.contact-grid {
    grid-template-columns: 1.2fr 0.8fr;
}

.contact-card {
    min-height: 100%;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.contact-item span {
    display: block;
    font-size: 0.85rem;
    color: var(--text-soft);
    margin-bottom: 6px;
}

.qr-placeholder,
.map-placeholder {
    display: grid;
    place-items: center;
    gap: 16px;
    min-height: 280px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(154, 216, 255, 0.2);
    text-align: center;
}

.qr-grid {
    width: 180px;
    height: 180px;
    border-radius: 20px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 10%, transparent 10% 20%, rgba(255, 255, 255, 0.06) 20% 30%, transparent 30% 40%, rgba(255, 255, 255, 0.06) 40% 50%, transparent 50% 60%, rgba(255, 255, 255, 0.06) 60% 70%, transparent 70% 80%, rgba(255, 255, 255, 0.06) 80% 90%, transparent 90%),
        linear-gradient(rgba(255, 255, 255, 0.08) 10%, transparent 10% 20%, rgba(255, 255, 255, 0.08) 20% 30%, transparent 30% 40%, rgba(255, 255, 255, 0.08) 40% 50%, transparent 50% 60%, rgba(255, 255, 255, 0.08) 60% 70%, transparent 70% 80%, rgba(255, 255, 255, 0.08) 80% 90%, transparent 90%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 26px rgba(0, 191, 255, 0.12);
}

.map-card {
    grid-column: 1 / -1;
}

.footer {
    width: var(--container);
    margin: 0 auto;
    padding: 20px 0 60px;
    color: var(--text-soft);
    text-align: center;
}

.modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    z-index: 40;
}

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

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 7, 16, 0.84);
    backdrop-filter: blur(12px);
}

.modal-panel {
    position: relative;
    z-index: 1;
    width: min(900px, 100%);
    padding: 20px;
    border-radius: 28px;
    background: rgba(9, 12, 19, 0.85);
    border: 1px solid rgba(154, 216, 255, 0.2);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

body.light-mode .modal-panel {
    background: rgba(255, 255, 255, 0.95);
}

.modal-panel img {
    width: 100%;
    border-radius: 20px;
}

.modal-panel h3 {
    margin: 16px 0 0;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.48);
    color: #ffffff;
    cursor: pointer;
}

.reveal {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-up { transform: translateY(40px); }
.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.reveal-zoom { transform: scale(0.92); }

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

.easter-egg {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
}

.easter-egg.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.easter-egg-card {
    width: min(360px, calc(100vw - 32px));
    padding: 20px;
    border-radius: 22px;
    background: rgba(7, 16, 27, 0.88);
    border: 1px solid rgba(0, 191, 255, 0.28);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.easter-badge {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0, 191, 255, 0.12);
    color: #bbf4ff;
    font-size: 0.78rem;
}

.ripple-wave {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    background: rgba(255, 255, 255, 0.28);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes animatedBackground {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes terminalLineIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blink {
    50% { opacity: 0; }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(49, 242, 155, 0.6); }
    70% { box-shadow: 0 0 0 12px rgba(49, 242, 155, 0); }
    100% { box-shadow: 0 0 0 0 rgba(49, 242, 155, 0); }
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

@media (max-width: 1100px) {
    .hero-content,
    .about-grid,
    .contact-grid,
    .skills-grid,
    .project-grid,
    .gallery-grid,
    .social-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid .map-card {
        grid-column: auto;
    }

    .hero-content {
        gap: 28px;
    }

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

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

    .social-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .navbar {
        align-items: flex-start;
        padding: 14px 16px;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        display: grid;
        gap: 10px;
        padding: 14px;
        border-radius: 22px;
        background: rgba(7, 16, 27, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(18px);
        box-shadow: var(--shadow);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    }

    body.light-mode .nav-links {
        background: rgba(255, 255, 255, 0.92);
    }

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

    .hero {
        min-height: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-text h1 {
        font-size: clamp(2.2rem, 10vw, 4rem);
    }
}

@media (max-width: 640px) {
    :root {
        --container: min(100% - 20px, 100%);
        --nav-height: 76px;
    }

    .section {
        padding: 84px 0;
    }

    .terminal-body,
    .hero-avatar,
    .info-panel,
    .data-card,
    .contact-card,
    .map-card {
        padding: 20px;
    }

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

    .project-grid,
    .gallery-grid,
    .social-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
    }

    .primary-button,
    .secondary-button,
    .nav-button {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
