/* ─────────────────────────────────────────────
   Custom Properties
───────────────────────────────────────────── */
:root {
    --ink:       #0F0F0F;
    --ink-muted: #888888;
    --ink-faint: #C0C0C0;
    --paper:     #FFFFFF;
    --paper-2:   #F4F4F4;
    --paper-3:   #EAEAEA;
    --border:    #E0E0E0;

    --hero-bg:     #0F0F0F;
    --hero-text:   #FFFFFF;
    --hero-muted:  #777777;
    --hero-border: rgba(255,255,255,0.12);

    /* gradient pulled from logo */
    --grad: linear-gradient(135deg, #8B57D8 0%, #D04FA0 100%);
    --grad-text: linear-gradient(135deg, #A06CE0 0%, #D966AD 100%);
    --accent: #8B57D8;

    --f-sans: 'Epilogue', system-ui, sans-serif;
    --f-mono: 'Azeret Mono', 'Courier New', monospace;

    --nav-h: 72px;
    --max-w: 1200px;
    --px:    2rem;
}

/* ─────────────────────────────────────────────
   Reset
───────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--hero-bg);
}

body {
    font-family: var(--f-sans);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

/* ─────────────────────────────────────────────
   Navigation
───────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-h);
    background: rgba(15, 15, 15, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    transition: box-shadow 0.3s;
}

.nav-container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--px);
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.logo-img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: block;
    flex-shrink: 0;
}

.logo span {
    font-family: var(--f-sans);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--hero-text);
    letter-spacing: -0.02em;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-menu a {
    font-family: var(--f-sans);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hero-muted);
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--grad);
    background: linear-gradient(90deg, #8B57D8, #D04FA0);
    transition: width 0.25s ease;
}

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

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* ─────────────────────────────────────────────
   Hero  (dark, inverted)
───────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100vh;
    padding: calc(var(--nav-h) + 5rem) var(--px) 7rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--hero-bg);
    background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 28px 28px;
}

.hero-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    width: 100%;
}

.hero-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    font-family: var(--f-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hero-muted);
    animation: fade-up 0.8s ease-out 0.1s both;
}

.hero-label-line {
    display: block;
    width: 36px;
    height: 1px;
    background: var(--hero-muted);
    flex-shrink: 0;
}

.hero-headline {
    font-family: var(--f-sans);
    font-size: clamp(3.5rem, 9vw, 9rem);
    font-weight: 800;
    line-height: 1.0;
    letter-spacing: -0.03em;
    color: var(--hero-text);
    font-optical-sizing: auto;
    animation: fade-up 0.9s ease-out 0.25s both;
}

.hero-headline em {
    font-style: normal;
    background: var(--grad-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding-right: 0.08em;
}

.hero-rule {
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(139,87,216,0.6), rgba(208,79,160,0.2));
    margin: 2.5rem 0;
    animation: expand-rule 0.8s ease-out 0.5s both;
}

.hero-footer {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
    flex-wrap: wrap;
    animation: fade-up 0.8s ease-out 0.55s both;
}

.hero-description {
    font-size: 1.05rem;
    color: var(--hero-muted);
    line-height: 1.65;
    max-width: 300px;
    font-weight: 400;
}

.hero-scroll-hint {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--f-mono);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    color: var(--hero-muted);
    text-transform: uppercase;
    animation: bounce 2.5s ease-in-out 1.5s infinite;
}

/* ─────────────────────────────────────────────
   Section Header (shared)
───────────────────────────────────────────── */
.section-header {
    margin-bottom: 4.5rem;
}

.section-title {
    font-family: var(--f-sans);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--ink);
    font-optical-sizing: auto;
}

.section-title em {
    font-style: normal;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─────────────────────────────────────────────
   Clients
───────────────────────────────────────────── */
.clients-section {
    padding: 8rem 0;
    background: var(--paper-2);
    border-top: 1px solid var(--border);
}

.clients-list {
    border-bottom: 1px solid var(--border);
}

.client-item {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.75rem 0;
    border-top: 1px solid var(--border);
    cursor: default;
}

.client-name {
    font-family: var(--f-sans);
    font-size: clamp(1.15rem, 2.5vw, 1.75rem);
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
    flex: 0 0 auto;
    max-width: 55%;
}

.client-divider {
    flex: 1;
    height: 1px;
    background: var(--border);
}

.client-sector {
    font-family: var(--f-mono);
    font-size: 0.72rem;
    color: var(--ink-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* ─────────────────────────────────────────────
   Services
───────────────────────────────────────────── */
.services-section {
    padding: 8rem 0;
    background: var(--paper);
    border-top: 1px solid var(--border);
}

.block-label {
    font-family: var(--f-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

/* Projects */
.projects-block {
    margin-bottom: 6rem;
}

.projects-list {
    border-bottom: 1px solid var(--border);
}

.project-item {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 2rem;
    padding: 2.5rem 0;
    border-top: 1px solid var(--border);
    align-items: start;
}

.project-item:first-child {
    border-top: none;
}

.project-num {
    font-family: var(--f-mono);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    padding-top: 0.25rem;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-content h4 {
    font-family: var(--f-sans);
    font-size: clamp(1.3rem, 2.5vw, 1.9rem);
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.65rem;
    letter-spacing: -0.02em;
}

.project-content p {
    font-size: 1rem;
    font-weight: 400;
    color: var(--ink-muted);
    line-height: 1.7;
    max-width: 560px;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2.5rem 3rem;
}

.skill-group-title {
    font-family: var(--f-sans);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.skill-tags span {
    font-family: var(--f-mono);
    font-size: 0.72rem;
    color: var(--ink-muted);
    background: var(--paper-2);
    border: 1px solid var(--border);
    padding: 0.3rem 0.65rem;
    letter-spacing: 0.03em;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    cursor: default;
}

.skill-tags span:hover {
    border-color: var(--accent);
    color: var(--ink);
    background: var(--paper-3);
}

/* ─────────────────────────────────────────────
   Contact
───────────────────────────────────────────── */
.contact-section {
    padding: 8rem 0;
    background: var(--paper-2);
    border-top: 1px solid var(--border);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6rem;
    align-items: start;
}

.contact-heading {
    margin-bottom: 2rem;
}

.contact-intro {
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--ink-muted);
    line-height: 1.75;
    margin-bottom: 2.5rem;
    max-width: 460px;
}

.linkedin-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.75rem;
    font-family: var(--f-sans);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--hero-text);
    text-decoration: none;
    letter-spacing: 0.01em;
    background: var(--grad);
    transition: opacity 0.2s, transform 0.2s;
    border: none;
}

.linkedin-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.linkedin-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.contact-portrait {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    flex-shrink: 0;
}

.director-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    display: block;
    box-shadow: 0 0 0 4px var(--paper-2), 0 0 0 6px var(--border);
}

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

.director-name {
    display: block;
    font-family: var(--f-sans);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.director-title {
    display: block;
    font-family: var(--f-mono);
    font-size: 0.7rem;
    color: var(--ink-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 0.3rem;
}

/* ─────────────────────────────────────────────
   Footer
───────────────────────────────────────────── */
.footer {
    padding: 2.5rem 0;
    background: var(--hero-bg);
    border-top: 1px solid rgba(255,255,255,0.07);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
}

.footer p {
    font-family: var(--f-mono);
    font-size: 0.72rem;
    color: var(--hero-muted);
    letter-spacing: 0.05em;
}

/* ─────────────────────────────────────────────
   Animations
───────────────────────────────────────────── */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes expand-rule {
    from { width: 0; opacity: 0; }
    to   { width: 100%; opacity: 1; }
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0);   opacity: 0.5; }
    50%       { transform: translateX(-50%) translateY(6px); opacity: 1; }
}

.scroll-reveal {
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* ─────────────────────────────────────────────
   Responsive
───────────────────────────────────────────── */
@media (max-width: 900px) {
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-portrait {
        flex-direction: row;
        align-items: center;
        gap: 1.5rem;
        justify-content: flex-start;
        order: -1;
    }

    .director-info { text-align: left; }
}

@media (max-width: 768px) {
    :root {
        --px:    1.25rem;
        --nav-h: 88px;
    }

    .nav-container {
        flex-direction: column;
        justify-content: center;
        gap: 0.4rem;
        height: var(--nav-h);
    }

    .nav-menu { gap: 1.25rem; }

    .nav-menu a {
        font-size: 0.72rem;
        letter-spacing: 0.04em;
    }

    .hero {
        padding-top: calc(var(--nav-h) + 2rem);
        padding-bottom: 3rem;
        min-height: unset;
        justify-content: flex-start;
    }

    .hero-scroll-hint { display: none; }

    .hero-footer {
        flex-direction: column;
        gap: 1.5rem;
    }

    .hero-description { max-width: 100%; }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 3rem;
    }

    .client-item {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 1.25rem 0;
    }


    .client-name  { max-width: 100%; }
    .client-divider { display: none; }
    .client-sector  { width: 100%; text-align: left; }

    .project-item {
        grid-template-columns: 52px 1fr;
        gap: 1rem;
        padding: 2rem 0;
    }

    .skills-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem 1.5rem;
    }

    .clients-section,
    .services-section,
    .contact-section {
        padding: 5rem 0;
    }
}

@media (max-width: 480px) {
    .skills-grid { grid-template-columns: 1fr; }
    .nav-menu { gap: 1.25rem; }
}
