:root {
    --bg: #080b12;
    --bg-soft: #0d121b;
    --surface: #111823;
    --surface-2: #151e2a;
    --text: #f2f5f7;
    --muted: #98a4b1;
    --muted-light: #c4ccd4;
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.18);
    --cyan: #70eef7;
    --blue: #2688ff;
    --orange: #ffac32;
    --green: #36d99a;
    --purple: #aa7cff;
    --header-height: 78px;
    --radius: 24px;
    --display: "Space Grotesk", sans-serif;
    --body: "DM Sans", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
    margin: 0;
    min-width: 320px;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 85% 5%, rgba(38, 136, 255, 0.1), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: var(--body);
    line-height: 1.65;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.menu-open {
    overflow: hidden;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
    background: var(--cyan);
    color: #061015;
}

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

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
    font: inherit;
}

h1,
h2,
h3,
p,
dl,
dd,
ol,
ul {
    margin: 0;
}

.shell {
    width: min(1180px, calc(100% - 48px));
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 999;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--text);
    color: var(--bg);
    transform: translateY(-160%);
    transition: transform 180ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: 100%;
    border-bottom: 1px solid transparent;
    transition: background 220ms ease, border-color 220ms ease, backdrop-filter 220ms ease;
}

.site-header.is-scrolled {
    border-color: var(--line);
    background: rgba(8, 11, 18, 0.86);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--display);
    font-weight: 600;
}

.brand-mark,
.footer-brand span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: rgba(112, 238, 247, 0.07);
    color: var(--cyan);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}

.brand-name {
    font-size: 0.95rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-nav a {
    color: var(--muted-light);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: none;
    transition: color 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    color: var(--text);
}

.site-nav .nav-contact {
    padding: 9px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--text);
}

.nav-toggle {
    display: none;
    width: 46px;
    height: 46px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    cursor: pointer;
}

.nav-toggle span {
    position: absolute;
    width: 19px;
    height: 1.5px;
    border-radius: 1px;
    background: var(--text);
    transition: transform 220ms ease;
}

.nav-toggle span:first-child { transform: translateY(-4px); }
.nav-toggle span:last-child { transform: translateY(4px); }
.nav-toggle[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }

.section-label {
    color: var(--cyan);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: none;
}

.hero {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 54px;
    min-height: max(720px, 100svh);
    padding-top: calc(var(--header-height) + 70px);
    padding-bottom: 54px;
}

.hero-copy h1 {
    grid-column: 1 / -1;
    margin-top: 20px;
    font-family: var(--display);
    font-size: clamp(4rem, 7vw, 6.3rem);
    font-weight: 600;
    letter-spacing: -0.075em;
    line-height: 0.9;
    white-space: nowrap;
}

.hero-copy {
    display: grid;
    grid-template-columns: minmax(280px, 0.7fr) minmax(420px, 1fr);
    column-gap: clamp(54px, 9vw, 120px);
}

.hero-copy > .section-label {
    grid-column: 1 / -1;
}

.hero-role {
    grid-column: 1;
    margin-top: 28px;
    color: var(--cyan);
    font-family: var(--display);
    font-size: clamp(1.15rem, 2.2vw, 1.7rem);
    font-weight: 500;
    letter-spacing: -0.02em;
}

.hero-summary {
    grid-column: 2;
    grid-row: 3 / span 2;
    max-width: none;
    margin-top: 28px;
    color: var(--muted-light);
    font-size: 1.05rem;
}

.hero-summary p + p {
    margin-top: 12px;
}

.hero-actions {
    grid-column: 1;
    display: flex;
    flex-wrap: wrap;
    align-self: start;
    align-items: flex-start;
    gap: 12px;
    margin-top: 34px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 50px;
    padding: 12px 19px;
    border: 1px solid transparent;
    border-radius: 13px;
    font-size: 0.86rem;
    font-weight: 700;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--text); color: var(--bg); }
.button-primary:hover { background: var(--cyan); }
.button-secondary { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.02); }
.button-secondary:hover { border-color: rgba(112, 238, 247, 0.5); }

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-block: 1px solid var(--line);
}

.hero-stats div {
    display: grid;
    gap: 2px;
    padding: 20px 24px;
}

.hero-stats div + div { border-left: 1px solid var(--line); }
.hero-stats dt { font-family: var(--display); font-size: 1.45rem; font-weight: 600; }
.hero-stats dd { color: var(--muted); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: none; }

.section {
    padding-block: clamp(96px, 11vw, 150px);
}

.section-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
    align-items: end;
    gap: 54px;
    margin-bottom: clamp(44px, 6vw, 72px);
}

.section-header h2,
.contact-layout h2 {
    margin-top: 16px;
    font-family: var(--display);
    font-size: clamp(2.8rem, 5.5vw, 5.3rem);
    font-weight: 600;
    letter-spacing: -0.06em;
    line-height: 0.98;
}

.section-header > p {
    color: var(--muted);
    font-size: 1rem;
}

.projects-section {
    border-top: 1px solid var(--line);
    background: var(--bg-soft);
}

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

.project-card {
    display: grid;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color 240ms ease, transform 240ms ease;
}

.project-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-5px);
}

.project-visual {
    position: relative;
    display: grid;
    min-height: 300px;
    overflow: hidden;
    place-items: center;
    isolation: isolate;
}

.project-visual img { width: min(38%, 190px); filter: drop-shadow(0 25px 30px rgba(0, 0, 0, 0.32)); transition: transform 300ms ease; }
.project-card:hover .project-visual img { transform: scale(1.04); }

.visual-color-merge { background: radial-gradient(circle, rgba(36, 130, 255, 0.34), transparent 44%), #091526; }
.visual-blue { background: linear-gradient(145deg, #082649, #0d7bc4); }
.visual-orange { background: linear-gradient(145deg, #3b2106, #ca760e); }
.visual-green { background: linear-gradient(145deg, #06302b, #087d95); }

.visual-color-merge::before,
.visual-blue::before,
.visual-orange::before,
.visual-green::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(circle, black, transparent 74%);
}

.visual-research {
    background: radial-gradient(circle at 50% 40%, rgba(170, 124, 255, 0.25), transparent 36%), #14101e;
}

.visual-erp {
    align-content: center;
    gap: 28px;
    background:
        linear-gradient(rgba(112, 238, 247, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(112, 238, 247, 0.06) 1px, transparent 1px),
        radial-gradient(circle, rgba(54, 217, 154, 0.2), transparent 58%),
        #081a19;
    background-size: 38px 38px, 38px 38px, auto, auto;
}

.erp-mark {
    display: grid;
    width: 120px;
    aspect-ratio: 1;
    place-items: center;
    border: 1px solid rgba(54, 217, 154, 0.55);
    border-radius: 24px;
    color: var(--green);
    font-family: var(--display);
    font-size: 1.8rem;
    font-weight: 700;
    box-shadow: 0 0 54px rgba(54, 217, 154, 0.15);
}

.erp-flow {
    display: flex;
    gap: 8px;
}

.erp-flow span {
    padding: 7px 10px;
    border: 1px solid rgba(54, 217, 154, 0.3);
    border-radius: 999px;
    color: #a8f1d2;
    font-family: var(--display);
    font-size: 0.65rem;
}

.visual-research > span {
    position: relative;
    z-index: 1;
    display: grid;
    width: 120px;
    aspect-ratio: 1;
    place-items: center;
    border: 1px solid rgba(170, 124, 255, 0.5);
    border-radius: 50%;
    color: #d5bfff;
    font-family: var(--display);
    font-size: 2rem;
    box-shadow: 0 0 60px rgba(170, 124, 255, 0.18);
}

.visual-research i {
    position: absolute;
    border: 1px solid rgba(170, 124, 255, 0.15);
    border-radius: 50%;
}

.visual-research i:nth-of-type(1) { width: 190px; aspect-ratio: 1; }
.visual-research i:nth-of-type(2) { width: 260px; aspect-ratio: 1; }
.visual-research i:nth-of-type(3) { width: 330px; aspect-ratio: 1; }

.project-content {
    display: flex;
    flex-direction: column;
    padding: clamp(26px, 4vw, 42px);
}

.project-topline { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; color: var(--cyan); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; text-transform: none; }
.project-card:nth-child(3) .project-topline { color: var(--orange); }
.project-card:nth-child(4) .project-topline { color: var(--green); }
.project-erp .project-topline { color: var(--green); }
.project-research .project-topline { color: #c6a9ff; }
.project-content h3 { margin-top: 22px; font-family: var(--display); font-size: clamp(1.55rem, 2.6vw, 2.2rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1; }
.project-content > p { margin-top: 18px; color: var(--muted-light); }

.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: auto;
    padding-top: 32px;
}

.project-actions a {
    display: inline-flex;
    gap: 8px;
    padding-bottom: 3px;
    border-bottom: 1px solid var(--line-strong);
    color: var(--muted-light);
    font-size: 0.75rem;
    font-weight: 700;
}

.project-actions a:hover { border-color: var(--cyan); color: var(--text); }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.project-tags span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted-light); font-size: 0.7rem; }

.skills-section {
    border-block: 1px solid var(--line);
    background: var(--bg-soft);
}

.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.skill-group { display: flex; min-width: 0; flex-direction: column; padding: 32px 28px; background: var(--surface); }
.skill-group + .skill-group { border-left: 1px solid var(--line); }
.skill-group > span { color: var(--cyan); font-family: var(--display); font-size: 0.72rem; }
.skill-group h3 { min-height: 62px; margin-top: 34px; font-family: var(--display); font-size: 1.25rem; line-height: 1.2; }
.skill-group ul { display: grid; gap: 10px; margin-top: 26px; padding: 0; list-style: none; }
.skill-group li { position: relative; padding-left: 14px; color: var(--muted); font-size: 0.86rem; }
.skill-group li::before { position: absolute; top: 0.75em; left: 0; width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); content: ""; }

.skill-links {
    margin-top: auto;
    padding-top: 30px;
}

.skill-links strong {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.skill-links > div {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.skill-links a {
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted-light);
    font-size: 0.66rem;
    transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.skill-links a:hover {
    border-color: rgba(112, 238, 247, 0.45);
    background: rgba(112, 238, 247, 0.05);
    color: var(--text);
}

.contact-section {
    padding-block: clamp(100px, 13vw, 180px);
    border-top: 1px solid var(--line);
    background: radial-gradient(circle at 75% 45%, rgba(38, 136, 255, 0.15), transparent 30%), #06090e;
}

.contact-layout { display: grid; grid-template-columns: minmax(280px, 0.55fr) minmax(0, 1fr); gap: clamp(50px, 9vw, 120px); align-items: end; }
.contact-details { display: grid; gap: 70px; }
.contact-email { display: inline-flex; align-items: center; justify-content: space-between; gap: 14px; max-width: 100%; padding-bottom: 10px; border-bottom: 1px solid var(--cyan); color: var(--cyan); font-family: var(--display); font-size: clamp(1.25rem, 2.4vw, 2.15rem); font-weight: 600; letter-spacing: -0.04em; white-space: nowrap; }
.contact-row { display: flex; align-items: center; justify-content: flex-end; gap: 28px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted-light); font-size: 0.78rem; }
.contact-row a { font-weight: 700; text-transform: none; }

.site-footer { border-top: 1px solid var(--line); background: #05070b; }
.footer-main, .footer-bottom { display: flex; align-items: center; justify-content: space-between; }
.footer-main { min-height: 130px; }
.footer-policies { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }
.footer-policies a, .footer-bottom { color: var(--muted); font-size: 0.7rem; }
.footer-policies a:hover { color: var(--text); }
.footer-bottom { padding-block: 18px 28px; border-top: 1px solid var(--line); }
.footer-bottom a { color: var(--muted-light); }

.js .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 650ms cubic-bezier(0.2, 0.75, 0.25, 1) var(--delay, 0ms), transform 650ms cubic-bezier(0.2, 0.75, 0.25, 1) var(--delay, 0ms);
}

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

@media (max-width: 1040px) {
    .site-nav { gap: 16px; }
    .site-nav a { font-size: 0.66rem; }
    .skills-grid { grid-template-columns: repeat(2, 1fr); }
    .skill-group:nth-child(3) { border-top: 1px solid var(--line); border-left: 0; }
    .skill-group:nth-child(4) { border-top: 1px solid var(--line); }
}

@media (max-width: 820px) {
    :root { --header-height: 72px; }
    .shell { width: min(100% - 36px, 680px); }
    .brand-name { display: none; }
    .js .nav-toggle { display: grid; }
    .site-nav { position: absolute; top: calc(100% + 10px); right: 18px; left: 18px; display: grid; gap: 0; padding: 12px; border: 1px solid var(--line-strong); border-radius: 20px; background: rgba(12, 17, 26, 0.98); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); }
    .site-nav a { padding: 13px 14px; border-radius: 10px; font-size: 0.75rem; }
    .site-nav .nav-contact { margin-top: 5px; padding: 13px 14px; border-radius: 12px; }
    .js .site-nav { visibility: hidden; opacity: 0; transform: translateY(-10px) scale(0.98); transform-origin: top center; transition: opacity 180ms ease, transform 180ms ease, visibility 180ms; }
    .js .site-nav.is-open { visibility: visible; opacity: 1; transform: translateY(0) scale(1); }
    .hero { grid-template-columns: 1fr; gap: 42px; min-height: 0; padding-top: 130px; padding-bottom: 70px; }
    .hero-copy { grid-template-columns: 1fr; }
    .hero-copy h1 { white-space: normal; }
    .hero-role, .hero-summary, .hero-actions { grid-column: 1; }
    .hero-summary { grid-row: auto; margin-top: 22px; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .hero-stats div:nth-child(3) { border-top: 1px solid var(--line); border-left: 0; }
    .hero-stats div:nth-child(4) { border-top: 1px solid var(--line); }
    .section-header { grid-template-columns: 1fr; gap: 20px; }
    .contact-layout { grid-template-columns: 1fr; gap: 46px; }
}

@media (max-width: 600px) {
    .shell { width: min(100% - 28px, 520px); }
    .hero { padding-top: 112px; }
    .hero-copy h1 { font-size: clamp(3.1rem, 15vw, 4.8rem); }
    .hero-summary { font-size: 0.96rem; }
    .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .button { min-width: 0; padding-inline: 13px; font-size: 0.76rem; }
    .hero-stats div { padding: 16px; }
    .section { padding-block: 84px; }
    .section-header h2, .contact-layout h2 { font-size: clamp(2.5rem, 13vw, 3.8rem); }
    .projects-grid { grid-template-columns: 1fr; }
    .project-visual { min-height: 280px; }
    .project-visual img { width: min(39%, 160px); }
    .project-content { padding: 25px 22px; }
    .project-content h3 { font-size: 1.75rem; }
    .project-actions { gap: 14px; }
    .skills-grid { grid-template-columns: 1fr; }
    .skill-group + .skill-group { border-top: 1px solid var(--line); border-left: 0; }
    .skill-group h3 { min-height: 0; margin-top: 24px; }
    .contact-details { gap: 46px; }
    .contact-email { gap: 8px; font-size: clamp(0.92rem, 4.1vw, 1.1rem); letter-spacing: -0.025em; }
    .contact-row { align-items: flex-start; flex-direction: column; }
    .footer-main, .footer-bottom { align-items: flex-start; flex-direction: column; gap: 24px; }
    .footer-main { padding-block: 38px; }
    .footer-policies { justify-content: flex-start; }
    .footer-bottom { padding-block: 22px 30px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    .js .reveal { opacity: 1; transform: none; }
}
