:root {
    color-scheme: light;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --primary-gold: #daa520;
    --primary-gold-dark: #b8860b;
    --primary-gold-soft: rgba(218, 165, 32, 0.14);

    --bg: #f7f4ed;
    --bg-soft: #f1ece1;
    --surface: #ffffff;
    --surface-strong: #fffdf8;
    --text: #1f2933;
    --text-soft: #4f5d6b;
    --text-muted: #71808f;
    --border: rgba(31, 41, 51, 0.1);
    --shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
    --shadow-strong: 0 18px 42px rgba(17, 24, 39, 0.12);
    --nav-bg: rgba(247, 244, 237, 0.88);
    --hero-text: #ffffff;
    --hero-overlay: rgba(17, 24, 39, 0.42);
    --hero-start: #3b4a5a;
    --hero-end: #8d6a17;
    --footer-bg: #18202a;
    --footer-text: #d7dee6;
    --ring: rgba(218, 165, 32, 0.32);
    --max-width: 1160px;
    --nav-height: 78px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --bg: #13171d;
        --bg-soft: #1a2028;
        --surface: #1b222c;
        --surface-strong: #222b36;
        --text: #eef3f8;
        --text-soft: #c0cbd7;
        --text-muted: #91a1b3;
        --border: rgba(238, 243, 248, 0.1);
        --shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
        --shadow-strong: 0 18px 42px rgba(0, 0, 0, 0.32);
        --nav-bg: rgba(19, 23, 29, 0.88);
        --hero-text: #f8f4ed;
        --hero-overlay: rgba(0, 0, 0, 0.36);
        --hero-start: #16202a;
        --hero-end: #6e5314;
        --footer-bg: #0e1217;
        --footer-text: #bdc8d4;
        --ring: rgba(218, 165, 32, 0.38);
    }
}

[data-theme='light'] {
    color-scheme: light;
    --bg: #f7f4ed;
    --bg-soft: #f1ece1;
    --surface: #ffffff;
    --surface-strong: #fffdf8;
    --text: #1f2933;
    --text-soft: #4f5d6b;
    --text-muted: #71808f;
    --border: rgba(31, 41, 51, 0.1);
    --shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
    --shadow-strong: 0 18px 42px rgba(17, 24, 39, 0.12);
    --nav-bg: rgba(247, 244, 237, 0.88);
    --hero-text: #ffffff;
    --hero-overlay: rgba(17, 24, 39, 0.42);
    --hero-start: #3b4a5a;
    --hero-end: #8d6a17;
    --footer-bg: #18202a;
    --footer-text: #d7dee6;
    --ring: rgba(218, 165, 32, 0.32);
}

[data-theme='dark'] {
    color-scheme: dark;
    --bg: #13171d;
    --bg-soft: #1a2028;
    --surface: #1b222c;
    --surface-strong: #222b36;
    --text: #eef3f8;
    --text-soft: #c0cbd7;
    --text-muted: #91a1b3;
    --border: rgba(238, 243, 248, 0.1);
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
    --shadow-strong: 0 18px 42px rgba(0, 0, 0, 0.32);
    --nav-bg: rgba(19, 23, 29, 0.88);
    --hero-text: #f8f4ed;
    --hero-overlay: rgba(0, 0, 0, 0.36);
    --hero-start: #16202a;
    --hero-end: #6e5314;
    --footer-bg: #0e1217;
    --footer-text: #bdc8d4;
    --ring: rgba(218, 165, 32, 0.38);
}

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

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

body {
    font-family: var(--font-body);
    color: var(--text);
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
    line-height: 1.65;
    transition: background-color 0.2s ease, color 0.2s ease;
}

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

a {
    color: inherit;
}

button {
    font: inherit;
}

:focus-visible {
    outline: 3px solid var(--ring);
    outline-offset: 3px;
}

.section {
    width: min(calc(100% - 2rem), var(--max-width));
    margin: 0 auto;
}

.section-block {
    padding: 4.5rem 0;
}

.section-heading {
    margin-bottom: 2.25rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.1;
    color: var(--text);
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--nav-bg);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.navbar.scrolled {
    border-bottom-color: var(--border);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.nav-container {
    width: min(calc(100% - 2rem), var(--max-width));
    min-height: var(--nav-height);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo {
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-gold);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-soft);
    font-weight: 500;
    position: relative;
    transition: color 0.2s ease;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.45rem;
    width: 100%;
    height: 2px;
    background: var(--primary-gold);
    border-radius: 999px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

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

.theme-toggle,
.mobile-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.theme-toggle {
    position: relative;
    overflow: hidden;
}

.theme-toggle-icon {
    position: absolute;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.theme-toggle-icon-sun {
    opacity: 1;
    transform: translateY(0);
}

.theme-toggle-icon-moon {
    opacity: 0;
    transform: translateY(10px);
}

[data-theme='dark'] .theme-toggle-icon-sun {
    opacity: 0;
    transform: translateY(-10px);
}

[data-theme='dark'] .theme-toggle-icon-moon {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu {
    display: none;
}

.hero {
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--hero-text);
    background:
        linear-gradient(var(--hero-overlay), var(--hero-overlay)),
        linear-gradient(135deg, var(--hero-start) 0%, var(--hero-end) 100%);
    padding: 4rem 0;
}

.hero-content {
    max-width: 760px;
}

.hero-avatar {
    width: clamp(140px, 22vw, 190px);
    height: clamp(140px, 22vw, 190px);
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
    margin: 0 auto 1.5rem;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.7rem, 7vw, 4.2rem);
    line-height: 1.05;
    margin-bottom: 0.85rem;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    margin-bottom: 1.8rem;
    color: rgba(255, 255, 255, 0.9);
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.25rem;
    padding: 0 1.35rem;
    border-radius: 999px;
    background: #ffffff;
    color: var(--primary-gold-dark);
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.about-content,
.contact-content {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 2rem;
    align-items: start;
}

.about-text,
.work-card,
.contact-info,
.location-info {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.about-text {
    padding: 1.8rem;
    border-radius: var(--radius-lg);
}

.about-text p {
    color: var(--text-soft);
    font-size: 1.05rem;
}

.about-text p + p {
    margin-top: 1rem;
}

.about-image img {
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4rem;
}

.work-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.work-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
}

.work-card-header {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    padding: 1.35rem 1.35rem 1rem;
    background: linear-gradient(135deg, var(--primary-gold-soft), transparent);
    border-bottom: 1px solid var(--border);
}

.work-card-header i {
    font-size: 1.25rem;
    color: var(--primary-gold);
    margin-top: 0.2rem;
}

.work-card-header h3 {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.work-card-header p,
.work-card-content p,
.contact-info p,
.location-info p {
    color: var(--text-soft);
}

.work-card-content {
    padding: 1.35rem;
}

.work-card-content p + p {
    margin-top: 0.85rem;
}

.work-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.work-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.6rem;
    padding: 0 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-strong);
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.work-link i {
    font-size: 0.95rem;
    margin-right: 0.15rem;
    flex: 0 0 auto;
}

.work-link-label {
    display: inline-block;
    margin-left: 0.1rem;
}

.work-link-sep {
    display: inline-block;
    width: 0.35rem;
    flex: 0 0 0.35rem;
}

.work-link:hover {
    background: var(--primary-gold);
    color: #151515;
    border-color: var(--primary-gold);
}

.contact-info,
.location-info {
    padding: 1.8rem;
    border-radius: var(--radius-lg);
    color: var(--text);
}

.contact-info h3,
.location-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.85rem;
    color: var(--primary-gold);
}

.contact-info {
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-strong) 100%);
}

.location-info {
    background: linear-gradient(180deg, var(--surface-strong) 0%, var(--surface) 100%);
}

.contact-info p + p,
.location-info p + p {
    margin-top: 0.9rem;
}

.contact-info p,
.location-info p {
    color: var(--text-soft);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.85rem;
    height: 2.85rem;
    border-radius: 50%;
    background: var(--primary-gold);
    color: #151515;
    text-decoration: none;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.social-link:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
}

.location-info {
    text-align: center;
}

.location-info i {
    font-size: 2.3rem;
    color: var(--primary-gold);
    margin-bottom: 0.9rem;
}

[data-theme='dark'] .contact-info,
[data-theme='dark'] .location-info {
    border-color: rgba(238, 243, 248, 0.14);
}

[data-theme='dark'] .contact-info p,
[data-theme='dark'] .location-info p {
    color: #d7e0ea;
}

[data-theme='dark'] .contact-info h3,
[data-theme='dark'] .location-info h3 {
    color: #efbf53;
}

[data-theme='dark'] .social-link {
    color: #10151b;
}

@media (prefers-color-scheme: dark) {
    :root .contact-info,
    :root .location-info {
        color: #eef3f8;
        border-color: rgba(238, 243, 248, 0.14);
    }

    :root .contact-info p,
    :root .location-info p {
        color: #d7e0ea;
    }

    :root .contact-info h3,
    :root .location-info h3 {
        color: #efbf53;
    }

    :root .social-link {
        color: #10151b;
    }
}

.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 1.5rem 0 2rem;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.95rem;
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.keyboard-navigation *:focus {
    outline: 3px solid var(--ring);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 900px) {
    .about-content,
    .contact-content,
    .work-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .mobile-menu {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 0.75rem);
        right: 1rem;
        left: 1rem;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.1rem 1.25rem;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow);
    }

    .nav-links.open {
        display: flex;
    }
}

@media (max-width: 640px) {
    :root {
        --nav-height: 72px;
    }

    .section,
    .nav-container {
        width: min(calc(100% - 1.25rem), var(--max-width));
    }

    .section-block {
        padding: 3.75rem 0;
    }

    .hero {
        min-height: auto;
        padding: 5rem 0 4rem;
    }

    .about-text,
    .contact-info,
    .location-info {
        padding: 1.35rem;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
