@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --background: #f5f6fa;
    --surface: #ffffff;
    --surface-soft: #eef0f6;
    --text: #171923;
    --muted: #5d6473;
    --border: #dfe3eb;
    --accent: #6753b8;
    --accent-dark: #4c3b91;
    --accent-soft: #ece8ff;
    --shadow: 0 18px 50px rgba(25, 27, 40, 0.08);
    --max-width: 1120px;
}

html[data-theme="dark"] {
    color-scheme: dark;

    --background: #11131a;
    --surface: #1b1e28;
    --surface-soft: #232735;
    --text: #f4f5f8;
    --muted: #b5bac7;
    --border: #343947;
    --accent: #9b88f2;
    --accent-dark: #c4b8ff;
    --accent-soft: #2c2850;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(
            circle at top right,
            rgba(103, 83, 184, 0.12),
            transparent 28rem
        ),
        var(--background);
    font-family: "Inter", Arial, sans-serif;
    line-height: 1.7;
    transition:
        color 180ms ease,
        background-color 180ms ease;
}

html[data-theme="dark"] body {
    background:
        radial-gradient(
            circle at top right,
            rgba(155, 136, 242, 0.13),
            transparent 28rem
        ),
        var(--background);
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 9999;
    padding: 0.75rem 1rem;
    color: #ffffff;
    background: var(--accent-dark);
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
}

/* =========================================
   HEADER AND NAVIGATION
   ========================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(223, 227, 235, 0.85);
    background: rgba(245, 246, 250, 0.9);
    backdrop-filter: blur(14px);
}

html[data-theme="dark"] .site-header {
    border-bottom-color: rgba(52, 57, 71, 0.9);
    background: rgba(17, 19, 26, 0.9);
}

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

.logo {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 12px;
    color: #ffffff;
    background: var(--text);
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.04em;
}

html[data-theme="dark"] .logo {
    color: #171923;
    background: #f4f5f8;
}

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

.nav-links a {
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--accent-dark);
}

.theme-toggle {
    min-height: 38px;
    padding: 0.45rem 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    background: var(--surface);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        transform 160ms ease,
        border-color 160ms ease,
        background-color 160ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.theme-icon {
    line-height: 1;
}

/* =========================================
   MAIN PAGE CONTAINER
   ========================================= */

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

/* =========================================
   HERO SECTION
   ========================================= */

.hero {
    min-height: auto;
    padding: 4.5rem 0 5rem;
    display: grid;
    grid-template-columns:
        minmax(0, 1.45fr)
        minmax(300px, 0.8fr);
    gap: 2.5rem;
    align-items: center;
}

.hero-content {
    min-width: 0;
}

.hero h1,
.section h2,
.page-title {
    margin: 0;
    font-family: "Playfair Display", Georgia, serif;
    line-height: 1.08;
}

.hero h1 {
    max-width: 760px;
    font-size: clamp(3rem, 8vw, 6.5rem);
    letter-spacing: -0.05em;
}

.hero-description {
    max-width: 720px;
    margin: 1.75rem 0 0;
    color: var(--muted);
    font-size: clamp(1.05rem, 2vw, 1.2rem);
}

.eyebrow,
.card-label {
    margin: 0 0 0.8rem;
    color: var(--accent-dark);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* =========================================
   BUTTONS
   ========================================= */

.hero-actions {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.75rem 1.25rem;
    border: 1px solid transparent;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition:
        transform 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-2px);
}

.primary-button {
    color: #ffffff;
    background: var(--accent);
}

.primary-button:hover,
.primary-button:focus-visible {
    background: var(--accent-dark);
}

.secondary-button {
    border-color: var(--border);
    background: var(--surface);
}

.secondary-button:hover,
.secondary-button:focus-visible {
    border-color: var(--accent);
    color: var(--accent-dark);
}

/* =========================================
   QUICK PROFILE LINKS
   ========================================= */

.quick-links {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.quick-links a {
    font-weight: 600;
    text-decoration: none;
}

.quick-links a:hover,
.quick-links a:focus-visible {
    color: var(--accent-dark);
}

/* =========================================
   CARDS
   ========================================= */

.hero-card,
.content-card,
.project-card,
.project-column {
    border: 1px solid rgba(223, 227, 235, 0.9);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

html[data-theme="dark"] .hero-card,
html[data-theme="dark"] .content-card,
html[data-theme="dark"] .project-card,
html[data-theme="dark"] .project-column {
    border-color: var(--border);
    background: rgba(27, 30, 40, 0.94);
}

.hero-card {
    min-width: 0;
    width: 100%;
    padding: 1.75rem;
    align-self: center;
}

.hero-card h2 {
    margin: 0;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 2rem;
    line-height: 1.2;
}

.focus-list {
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}

.focus-list li {
    position: relative;
    padding: 0.8rem 0 0.8rem 1.6rem;
    border-bottom: 1px solid var(--border);
}

.focus-list li:last-child {
    border-bottom: 0;
}

.focus-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.45rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

/* =========================================
   GENERAL SECTIONS
   ========================================= */

.section {
    padding: 5rem 0;
    scroll-margin-top: 90px;
}

.section-heading {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.section-number {
    margin: 0.35rem 0 0;
    color: var(--accent);
    font-weight: 700;
}

.section h2 {
    max-width: 780px;
    font-size: clamp(2.2rem, 5vw, 4rem);
    letter-spacing: -0.035em;
}

/* =========================================
   ABOUT SECTION
   ========================================= */

.about-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: 1.25rem;
}

.content-card {
    padding: 1.75rem;
}

.content-card p:first-child {
    margin-top: 0;
}

.content-card p:last-child {
    margin-bottom: 0;
}

.highlight-card {
    background: linear-gradient(
        145deg,
        var(--accent-soft),
        #ffffff
    );
}

html[data-theme="dark"] .highlight-card {
    background: linear-gradient(
        145deg,
        var(--accent-soft),
        var(--surface)
    );
}

.tag-list,
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.tag-list span,
.project-tags span {
    padding: 0.42rem 0.72rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--accent-dark);
    background: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
    font-weight: 600;
}

html[data-theme="dark"] .tag-list span,
html[data-theme="dark"] .project-tags span {
    background: rgba(44, 40, 80, 0.65);
}

/* =========================================
   RESUME SECTION
   ========================================= */

.resume-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1.45fr)
        minmax(300px, 0.65fr);
    gap: 2rem;
    align-items: start;
}

.resume-column {
    min-width: 0;
    padding-left: 1rem;
}

.resume-sidebar {
    min-width: 0;
    display: grid;
    gap: 1rem;
}

.subsection-title {
    margin: 0 0 1.5rem;
    font-size: 1.15rem;
}

.timeline-item {
    position: relative;
    padding: 0 0 3rem 2rem;
    border-left: 1px solid var(--border);
}

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

.timeline-marker {
    position: absolute;
    top: 0.35rem;
    left: -6px;
    width: 11px;
    height: 11px;
    border: 3px solid var(--background);
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.role-header {
    display: flex;
    justify-content: space-between;
    gap: 1.25rem;
    align-items: flex-start;
}

.role-header h4,
.skill-group h4,
.content-card h4,
.project-card h3 {
    margin: 0;
}

.role-header p {
    margin: 0.2rem 0 0;
    color: var(--muted);
}

.role-date {
    flex: 0 0 auto;
    font-size: 0.88rem;
    font-weight: 600;
}

.timeline-item ul {
    margin: 1rem 0 0;
    padding-left: 1.2rem;
    color: var(--muted);
}

.timeline-item li {
    margin-bottom: 0.55rem;
}

.skill-group + .skill-group {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.skill-group p {
    margin-top: 0.4rem;
    color: var(--muted);
}

.muted-text {
    color: var(--muted);
}

/* =========================================
   CERTIFICATIONS
   ========================================= */

.certification-item + .certification-item {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.certification-item p {
    margin: 0.4rem 0;
}

.certification-progress h4::after {
    content: "In Progress";
    display: inline-block;
    margin-left: 0.55rem;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    color: var(--accent-dark);
    background: var(--accent-soft);
    font-size: 0.68rem;
    font-weight: 700;
    vertical-align: middle;
}

/* =========================================
   PROJECT SECTION
   ========================================= */

.project-grid,
.projects-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.project-card,
.project-column {
    padding: 1.75rem;
}

.project-card {
    min-width: 0;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.project-card h3 {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 2rem;
}

.project-card > p:not(.card-label) {
    color: var(--muted);
}

.project-tags {
    margin: 1rem 0 1.5rem;
}

.text-link {
    margin-top: auto;
    color: var(--accent-dark);
    font-weight: 700;
    text-decoration: none;
}

.text-link:hover,
.text-link:focus-visible {
    text-decoration: underline;
}

/* =========================================
   CONTACT SECTION
   ========================================= */

.contact-section {
    margin-bottom: 4rem;
    padding: 3rem;
    border-radius: 28px;
    color: #ffffff;
    background: var(--text);
}

.contact-section h2 {
    color: #ffffff;
}

.contact-section > p:not(.eyebrow) {
    max-width: 700px;
    color: #c8ccd5;
}

.contact-section .eyebrow {
    color: #c9beff;
}

.contact-section .secondary-button {
    color: #ffffff;
    border-color: #434754;
    background: #2a2d36;
}

html[data-theme="dark"] .contact-section {
    background: #080a0f;
}

.contact-email {
    font-weight: 600;
}

.contact-email a {
    color: #ffffff;
}

.contact-email a:hover,
.contact-email a:focus-visible {
    color: #c9beff;
}

/* =========================================
   FOOTER
   ========================================= */

.site-footer {
    padding: 2rem 1rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    text-align: center;
    font-size: 0.9rem;
}

/* =========================================
   SUBPAGES
   ========================================= */

.page-header {
    padding: 5rem 0 2rem;
}

.page-title {
    font-size: clamp(2.6rem, 6vw, 5rem);
}

.page-intro {
    max-width: 720px;
    color: var(--muted);
    font-size: 1.05rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--accent-dark);
    font-weight: 700;
    text-decoration: none;
}

.project-column h2 {
    margin-top: 0;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 2rem;
}

.project-item {
    padding: 1.15rem 0;
    border-top: 1px solid var(--border);
}

.project-item:first-of-type {
    border-top: 0;
}

.project-item h3,
.project-item h4 {
    margin: 0 0 0.35rem;
}

.project-item p {
    margin: 0 0 0.75rem;
    color: var(--muted);
}

.project-item a {
    color: var(--accent-dark);
    font-weight: 700;
    text-decoration: none;
}

.project-item a:hover,
.project-item a:focus-visible {
    text-decoration: underline;
}


/* =========================================
   PHP PROJECT NOTICE
   ========================================= */

.project-notice {
    margin: 0 0 1.5rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--border);
    border-left: 5px solid var(--accent);
    border-radius: 14px;
    color: var(--text);
    background: var(--accent-soft);
    box-shadow: var(--shadow);
}

.project-notice strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--accent-dark);
}

.project-notice p {
    margin: 0;
    color: var(--muted);
}

html[data-theme="dark"] .project-notice {
    border-color: var(--border);
    border-left-color: var(--accent);
    background: var(--accent-soft);
}

/* =========================================
   TABLET LAYOUT
   ========================================= */

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

    .resume-column {
        padding-left: 0;
    }
}

/* =========================================
   SMALL TABLET / LARGE PHONE
   ========================================= */

@media (max-width: 780px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding-top: 4rem;
    }

    .hero-card {
        width: 100%;
    }
}

/* =========================================
   PHONE LAYOUT
   ========================================= */

@media (max-width: 700px) {
    .navbar {
        min-height: auto;
        padding: 0.9rem 0;
        align-items: flex-start;
    }

    .nav-links {
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 0.65rem 1rem;
    }

    .hero {
        padding: 4rem 0;
    }

    .section {
        padding: 4rem 0;
    }

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

    .role-header {
        flex-direction: column;
        gap: 0.25rem;
    }

    .contact-section {
        padding: 2.25rem;
    }
}

/* =========================================
   SMALL PHONE LAYOUT
   ========================================= */

@media (max-width: 480px) {
    .logo {
        width: 40px;
        height: 40px;
    }

    .nav-links {
        font-size: 0.86rem;
    }

    .theme-label {
        display: none;
    }

    .theme-toggle {
        width: 38px;
        padding: 0;
    }

    .hero h1 {
        font-size: 3.15rem;
    }

    .hero-card,
    .content-card,
    .project-card,
    .project-column {
        padding: 1.4rem;
        border-radius: 18px;
    }

    .section-heading {
        gap: 0.65rem;
    }
}

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

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}