* {
    box-sizing: border-box;
}

:root {
    --bg: #fbfaf7;
    --bg-warm: #f5f1ea;
    --surface: #fffdf9;
    --surface-tint: #f2eee6;
    --surface-accent: #edf2f3;

    --text: #172d3b;
    --text-soft: #344e5d;
    --muted: #617482;

    --accent: #b45e42;
    --accent-dark: #8c452f;
    --accent-soft: #f1ddd5;

    --blue: #315d70;
    --blue-soft: #dbe7ea;

    --line: #d8d3c9;
    --line-dark: #aab8bd;

    --shadow-soft: 0 10px 28px rgba(23, 45, 59, 0.045);
    --shadow-lift: 0 18px 38px rgba(23, 45, 59, 0.09);

    --header-height: 68px;
    --corner-cut: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);

    background-color: var(--bg);
    background-image:
        linear-gradient(rgba(49, 93, 112, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(49, 93, 112, 0.022) 1px, transparent 1px),
        radial-gradient(circle at 7% 9%, rgba(180, 94, 66, 0.08), transparent 27rem),
        radial-gradient(circle at 96% 24%, rgba(49, 93, 112, 0.065), transparent 32rem);
    background-size:
        42px 42px,
        42px 42px,
        auto,
        auto;
    background-attachment: fixed;
}

.main-content {
    padding-bottom: 84px;
}

/* =========================
   Site Header
========================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;

    height: var(--header-height);

    background-color: rgba(251, 250, 247, 0.86);
    border-bottom: 1px solid rgba(216, 211, 201, 0.78);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.site-header::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: -1px;

    width: 96px;
    height: 2px;

    background-color: var(--accent);
}

.site-nav {
    max-width: 1080px;
    height: 100%;

    margin: 0 auto;
    padding: 0 40px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
}

.site-name {
    position: relative;

    padding-left: 19px;

    color: var(--text);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;

    transition: color 0.2s ease;
}

.site-name::before {
    content: "";

    position: absolute;
    top: 50%;
    left: 0;

    width: 9px;
    height: 9px;

    background-color: var(--accent);

    transform: translateY(-50%) rotate(45deg);
}

.site-name:hover {
    color: var(--accent-dark);
}

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

.nav-links a {
    position: relative;

    padding: 6px 0;

    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
    text-transform: uppercase;

    transition: color 0.2s ease;
}

.nav-links a::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: 0;

    width: 100%;
    height: 2px;

    background-color: var(--accent);

    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.23s ease;
}

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

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

/* =========================
   Shared Section Layout
========================= */

.section {
    position: relative;

    max-width: 1080px;
    margin: 0 auto;
    padding: 74px 40px;
}

.section::before {
    content: "";

    position: absolute;
    top: 78px;
    left: 0;

    width: 2px;
    height: 52px;

    background-color: var(--accent);
}

.section::after {
    content: "";

    position: absolute;
    top: 78px;
    left: 0;

    width: 34px;
    height: 1px;

    background-color: var(--accent);
}

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

.section-label {
    margin: 0 0 12px;

    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.section-header h2 {
    max-width: 760px;

    margin: 0 0 14px;

    color: var(--text);
    font-size: clamp(34px, 4vw, 43px);
    line-height: 1.1;
    letter-spacing: -0.045em;
}

.section-intro {
    max-width: 690px;

    margin: 0;

    color: var(--muted);
    font-size: 16px;
    line-height: 1.72;
}

/* =========================
   Homepage Intro
========================= */

.about-me {
    position: relative;

    min-height: calc(100vh - var(--header-height));

    max-width: 1080px;
    margin: 0 auto;
    padding: 84px 40px 86px;

    display: flex;
    align-items: center;
    gap: 62px;
}

.about-me::before {
    content: "";

    position: absolute;
    top: 52px;
    right: 40px;

    width: 184px;
    height: 184px;

    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 16px 16px;

    opacity: 0.48;
    z-index: -1;
}

.about-me::after {
    content: "01 / INTRODUCTION";

    position: absolute;
    right: 40px;
    bottom: 45px;

    color: var(--line-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
}

.profile-image {
    width: 208px;
    height: 244px;

    flex-shrink: 0;

    object-fit: cover;
    object-position: center 25%;

    background-color: var(--surface-tint);

    clip-path: polygon(
        0 0,
        calc(100% - 25px) 0,
        100% 25px,
        100% 100%,
        25px 100%,
        0 calc(100% - 25px)
    );

    box-shadow: none;
}

.about-content {
    position: relative;
    flex: 1;

    padding-left: 32px;
    border-left: 1px solid var(--line);
}

.intro-label {
    margin: 0 0 14px;

    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.name {
    margin: 0 0 18px;

    color: var(--text);
    font-size: clamp(47px, 6vw, 62px);
    line-height: 1;
    letter-spacing: -0.06em;
}

.links {
    display: flex;
    gap: 11px;

    margin-bottom: 27px;

    flex-wrap: wrap;
    align-items: center;
}

.links a {
    position: relative;

    padding: 10px 16px;

    color: var(--blue);
    background-color: transparent;
    border: 1px solid var(--line-dark);

    font-size: 14px;
    font-weight: 700;
    text-decoration: none;

    overflow: hidden;

    transition:
        color 0.22s ease,
        border-color 0.22s ease,
        transform 0.22s ease;
}

.links a::before {
    content: "";

    position: absolute;
    inset: 0;
    z-index: -1;

    background-color: var(--blue);

    transform: translateY(100%);
    transition: transform 0.22s ease;
}

.links a:hover {
    color: var(--surface);
    border-color: var(--blue);
    transform: translateY(-2px);
}

.links a:hover::before {
    transform: translateY(0);
}

.desc {
    max-width: 670px;

    margin: 0;

    color: var(--text-soft);
    font-size: 16px;
    line-height: 1.76;
}

/* =========================
   Featured Blogs
========================= */

.featured-section {
    padding-top: 78px;
    padding-bottom: 78px;
}

.featured-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.featured-card {
    position: relative;

    min-height: 0;
    padding: 31px 38px 32px;

    background:
        linear-gradient(100deg, rgba(49, 93, 112, 0.032), transparent 58%),
        var(--surface);
    border: 1px solid var(--line);

    border-radius: 0;

    clip-path: polygon(
        0 0,
        calc(100% - var(--corner-cut)) 0,
        100% var(--corner-cut),
        100% 100%,
        0 100%
    );

    box-shadow: var(--shadow-soft);
}

.featured-card::before {
    content: "";

    position: absolute;
    left: 0;
    top: 0;

    width: 5px;
    height: 100%;

    background-color: var(--blue);

    transition:
        width 0.28s ease,
        background-color 0.28s ease;
}

.featured-card::after {
    content: "";

    position: absolute;
    top: 0;
    right: 0;

    width: var(--corner-cut);
    height: var(--corner-cut);

    background:
        linear-gradient(
            135deg,
            transparent 47%,
            var(--line) 48%,
            var(--line) 52%,
            transparent 53%
        );
}

.featured-card:hover {
    background:
        linear-gradient(100deg, rgba(180, 94, 66, 0.065), transparent 62%),
        var(--surface);
    border-color: #c8beb1;

    box-shadow: var(--shadow-lift);
    transform: translateX(6px);
}

.featured-card:hover::before {
    width: 7px;
    background-color: var(--accent);
}

.featured-card .card-top {
    margin-bottom: 13px;
}

.featured-card .card-top h3 {
    max-width: 750px;

    color: var(--text);
    font-size: clamp(24px, 3vw, 30px);
    line-height: 1.22;
    letter-spacing: -0.035em;
}

.card-kicker {
    margin: 0 0 11px;

    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* =========================
   Personal Background
========================= */

.personal-section {
    margin-top: 0;

    background:
        linear-gradient(
            to bottom,
            transparent,
            rgba(245, 241, 234, 0.48) 100px,
            rgba(245, 241, 234, 0.48) calc(100% - 100px),
            transparent
        );

    border-top: none;
}

.profile-grid {
    display: flex;
    flex-direction: column;
    gap: 58px;
}

.grouped-block {
    position: relative;

    padding-top: 0;
}

.grouped-block > h2 {
    position: relative;

    margin: 0 0 23px;
    padding-bottom: 14px;

    color: var(--text);
    font-size: 26px;
    letter-spacing: -0.025em;
}

.grouped-block > h2::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: 0;

    width: 100%;
    height: 1px;

    background:
        linear-gradient(
            to right,
            var(--accent) 0,
            var(--accent) 72px,
            var(--line) 72px,
            var(--line) 100%
        );
}

/* =========================
   Vertical Cards
========================= */

.card-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.card-item {
    position: relative;
    display: block;

    padding: 27px 29px;

    color: inherit;
    background-color: rgba(255, 253, 249, 0.94);
    border: 1px solid var(--line);

    border-radius: 0;

    text-decoration: none;

    clip-path: polygon(
        0 0,
        calc(100% - 18px) 0,
        100% 18px,
        100% 100%,
        0 100%
    );

    box-shadow: var(--shadow-soft);

    transition:
        transform 0.24s ease,
        border-color 0.24s ease,
        box-shadow 0.24s ease,
        background-color 0.24s ease;
}

.card-item::after {
    content: "";

    position: absolute;
    top: 0;
    right: 0;

    width: 18px;
    height: 18px;

    background:
        linear-gradient(
            135deg,
            transparent 47%,
            var(--line) 48%,
            var(--line) 52%,
            transparent 53%
        );
}

.card-item:hover {
    background-color: var(--surface);
    border-color: #bfc9c9;

    box-shadow: var(--shadow-lift);
    transform: translateX(6px);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;

    margin-bottom: 12px;
}

.card-top h3 {
    margin: 0 0 5px;

    color: var(--text);
    font-size: 19px;
    line-height: 1.3;
    letter-spacing: -0.015em;
}

.card-top h4 {
    margin: 0;

    color: var(--blue);
    font-weight: 600;
    font-size: 15px;
}

.arrow {
    flex-shrink: 0;

    color: var(--accent);
    font-size: 22px;

    transition: transform 0.2s ease;
}

.card-item:hover .arrow {
    transform: translate(3px, -3px);
}

.card-date {
    margin: 0 0 16px;

    color: var(--muted);
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.card-desc {
    max-width: 790px;

    margin: 0;

    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.7;
}

.card-desc + .card-desc {
    margin-top: 13px;
}

/* =========================
   Logo Cards
========================= */

.logo-card {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 23px;
    align-items: flex-start;
}

.logo-box {
    position: relative;

    width: 76px;
    height: 76px;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: var(--surface-tint);
    border: 1px solid var(--line);

    border-radius: 0;

    clip-path: polygon(
        0 0,
        calc(100% - 12px) 0,
        100% 12px,
        100% 100%,
        0 100%
    );

    overflow: hidden;
}

.logo-box .card-logo {
    display: block;

    width: 49px;
    height: 49px;
    max-width: 49px;
    max-height: 49px;

    margin: 0;

    border: none;
    border-radius: 0;

    object-fit: contain;
}

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

/* =========================
   Certification Variation
========================= */

.certification-item {
    background:
        repeating-linear-gradient(
            -45deg,
            rgba(49, 93, 112, 0.028) 0,
            rgba(49, 93, 112, 0.028) 8px,
            transparent 8px,
            transparent 16px
        ),
        var(--surface);
    border-left: 4px solid var(--accent);
}

/* =========================
   Resume
========================= */

.resume-section {
    padding-bottom: 90px;
}

.resume-preview {
    position: relative;

    width: 100%;
    height: 850px;

    background-color: var(--surface);
    border: 1px solid var(--line);

    border-radius: 0;

    overflow: hidden;
    box-shadow: var(--shadow-soft);

    clip-path: polygon(
        0 0,
        calc(100% - 22px) 0,
        100% 22px,
        100% 100%,
        0 100%
    );
}

.resume-preview iframe {
    display: block;

    width: 100%;
    height: 100%;

    border: none;
}

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

    margin-top: 19px;
}

.resume-link {
    position: relative;
    display: inline-block;

    padding: 12px 20px;

    color: var(--blue);
    background-color: var(--surface);
    border: 1px solid var(--line-dark);

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-decoration: none;
    text-transform: uppercase;

    overflow: hidden;

    transition:
        color 0.2s ease,
        border-color 0.2s ease;
}

.resume-link::before {
    content: "";

    position: absolute;
    inset: 0;
    z-index: -1;

    background-color: var(--blue);

    transform: translateY(100%);
    transition: transform 0.22s ease;
}

.resume-link:hover {
    color: white;
    border-color: var(--blue);
}

.resume-link:hover::before {
    transform: translateY(0);
}

/* =========================
   Blog Pages
========================= */

.blog-page {
    position: relative;

    max-width: 930px;
    margin: 0 auto;
    padding: 58px 40px 86px;

    line-height: 1.7;
}

.back-link {
    display: inline-block;

    margin-bottom: 36px;
    padding: 11px 16px;

    color: var(--blue);
    background-color: var(--surface);
    border: 1px solid var(--line-dark);

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-decoration: none;
    text-transform: uppercase;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.back-link:hover {
    color: white;
    background-color: var(--blue);
    border-color: var(--blue);
    text-decoration: none;
}

.blog-hero {
    position: relative;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;

    margin: 20px 0 44px;
    padding: 45px 47px 48px;

    background:
        linear-gradient(105deg, rgba(49, 93, 112, 0.055), transparent 70%),
        var(--surface);
    border: 1px solid var(--line);

    border-radius: 0;

    clip-path: polygon(
        0 0,
        calc(100% - 28px) 0,
        100% 28px,
        100% 100%,
        0 100%
    );

    box-shadow: var(--shadow-soft);
}

.blog-hero::before {
    content: "";

    position: absolute;
    left: 0;
    top: 0;

    width: 5px;
    height: 100%;

    background-color: var(--accent);
}

.blog-hero::after {
    content: "";

    position: absolute;
    top: 0;
    right: 0;

    width: 28px;
    height: 28px;

    background:
        linear-gradient(
            135deg,
            transparent 47%,
            var(--line) 48%,
            var(--line) 52%,
            transparent 53%
        );
}

.blog-hero h1 {
    margin: 0 0 23px;

    color: var(--text);
    font-size: clamp(35px, 5vw, 43px);
    line-height: 1.13;
    letter-spacing: -0.045em;
}

.blog-hero p {
    max-width: 810px;
    margin: 0;

    color: var(--text-soft);
    font-size: 20px;
    line-height: 1.62;
}

.hero-arrow {
    flex-shrink: 0;

    color: var(--accent);
    font-size: 42px;
    line-height: 1;
}

.project-links {
    margin-bottom: 45px;
    padding: 24px 0;

    background: transparent;

    border: none;
    border-left: 4px solid var(--accent);

    padding-left: 24px;
}

.project-links h2 {
    margin-top: 0;
    margin-bottom: 18px;

    color: var(--text);
    font-size: 26px;
}

.project-links p {
    margin: 10px 0;

    color: var(--text-soft);
    font-size: 16px;
}

.blog-page h1 {
    margin-top: 48px;
    margin-bottom: 18px;

    color: var(--text);
    font-size: 37px;
    line-height: 1.2;
    letter-spacing: -0.035em;
}

.blog-page h2 {
    position: relative;

    margin-top: 60px;
    margin-bottom: 22px;
    padding-bottom: 12px;

    color: var(--text);
    font-size: 30px;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.blog-page h2::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: 0;

    width: 100%;
    height: 1px;

    background:
        linear-gradient(
            to right,
            var(--accent) 0,
            var(--accent) 60px,
            var(--line) 60px,
            var(--line) 100%
        );
}

.blog-page p {
    margin-bottom: 24px;

    color: var(--text-soft);
    font-size: 17px;
    line-height: 1.78;
}

.blog-page a {
    color: var(--blue);
    font-weight: 700;
    text-decoration: none;
}

.blog-page a:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}

.blog-image {
    display: block;

    width: 100%;
    max-width: 100%;
    height: auto;

    margin: 34px 0 47px;

    border: 1px solid var(--line);

    border-radius: 0;

    object-fit: cover;

    box-shadow: 10px 10px 0 var(--surface-tint);
}

.blog-image-small {
    max-width: 520px;
}

.blog-formula {
    width: fit-content;

    margin: 29px 0 36px;
    padding: 22px 27px;

    color: var(--text);
    background-color: var(--surface-tint);
    border-left: 4px solid var(--accent);

    border-radius: 0;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 25px;
}

.blog-page code {
    padding: 3px 6px;

    color: var(--blue);
    background-color: var(--blue-soft);

    border-radius: 0;

    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 0.95em;
}

.blog-page pre {
    margin: 25px 0 36px;
    padding: 22px;

    overflow-x: auto;

    background-color: var(--text);
    border-left: 4px solid var(--accent);

    border-radius: 0;

    box-shadow: var(--shadow-soft);
}

.blog-page pre code {
    padding: 0;

    color: #f5f1ea;
    background-color: transparent;

    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 14px;
    line-height: 1.65;

    white-space: pre;
}

/* =========================
   Natural Scroll Reveal
========================= */

.reveal {
    opacity: 0;
    transform: translateY(28px);

    transition:
        opacity 0.62s ease,
        transform 0.62s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* =========================
   Responsive
========================= */

@media (max-width: 768px) {
    .site-header {
        height: auto;
    }

    .site-nav {
        padding: 17px 24px;

        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .nav-links {
        width: 100%;
        justify-content: space-between;
        gap: 15px;
    }

    .nav-links a {
        font-size: 12px;
    }

    .about-me {
        min-height: auto;

        flex-direction: column;
        align-items: flex-start;
        gap: 33px;

        padding: 48px 24px 64px;
    }

    .about-me::before,
    .about-me::after {
        display: none;
    }

    .profile-image {
        width: 175px;
        height: 202px;
    }

    .about-content {
        padding-left: 0;
        border-left: none;
    }

    .name {
        font-size: 43px;
    }

    .links {
        justify-content: flex-start;
    }

    .section {
        padding: 58px 24px;
    }

    .section::before,
    .section::after {
        display: none;
    }

    .featured-grid {
        display: flex;
        flex-direction: column;
    }

    .featured-card {
        padding: 25px 24px 27px;
    }

    .featured-card .card-top h3 {
        font-size: 23px;
    }

    .section-header h2 {
        font-size: 31px;
    }

    .card-item {
        padding: 22px 20px;
    }

    .card-top {
        gap: 13px;
    }

    .logo-card {
        grid-template-columns: 57px 1fr;
        gap: 15px;
    }

    .logo-box {
        width: 57px;
        height: 57px;
    }

    .logo-box .card-logo {
        width: 39px;
        height: 39px;
        max-width: 39px;
        max-height: 39px;
    }

    .resume-preview {
        height: 600px;
    }

    .blog-page {
        padding: 35px 20px 65px;
    }

    .blog-hero {
        padding: 30px 25px 34px;
    }

    .blog-hero h1 {
        font-size: 31px;
    }

    .blog-hero p {
        font-size: 18px;
    }

    .blog-page h1 {
        font-size: 31px;
    }

    .blog-page h2 {
        font-size: 25px;
    }

    .blog-page p {
        font-size: 16px;
    }

    .project-links {
        padding: 20px;
    }

    .blog-page pre {
        padding: 17px;
    }

    .blog-image-small {
        max-width: 100%;
    }
}

@media (max-width: 520px) {
    .links {
        flex-direction: column;
        align-items: stretch;
    }

    .links a {
        text-align: center;
    }

    .profile-grid {
        gap: 46px;
    }

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

    .resume-link {
        text-align: center;
    }

    .resume-preview {
        height: 515px;
    }
}

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

    .reveal,
    .card-item,
    .featured-card,
    .links a,
    .resume-link,
    .arrow {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .card-item:hover,
    .featured-card:hover,
    .links a:hover {
        transform: none;
    }
}