/* =========================================
   resar.one -- Wabi-Sabi Precision Portfolio
   ========================================= */

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

:root {
    --warm-stone: #E8E0D0;
    --deep-indigo: #1A1A4E;
    --burnt-orange: #D4642A;
    --slate-blue: #4A4A7A;
    --aged-gold: #B89A50;
    --soft-linen: #F5F0E5;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--slate-blue);
    background-color: var(--warm-stone);
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--deep-indigo);
    line-height: 1.2;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

h3 {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
}

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

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: var(--warm-stone);
    border-bottom: 1px solid rgba(26, 26, 78, 0.1);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    display: flex;
    align-items: center;
}

.logo-text {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--deep-indigo);
    letter-spacing: -0.02em;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--slate-blue);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: relative;
    background: linear-gradient(var(--burnt-orange), var(--burnt-orange)) no-repeat left bottom;
    background-size: 0% 2px;
    transition: background-size 0.4s ease;
    padding-bottom: 2px;
}

.nav-link:hover {
    background-size: 100% 2px;
    color: var(--deep-indigo);
}

/* --- Hero --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-marker {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.hero-marker svg {
    transition: transform 0.6s ease;
}

.hero-title {
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    color: var(--deep-indigo);
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.hero-highlight {
    color: var(--burnt-orange);
    position: relative;
    display: inline-block;
}

.hero-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    max-width: 540px;
    margin: 0 auto 2rem;
    color: var(--slate-blue);
}

.hero-rule {
    width: 80px;
    height: 2px;
    background: var(--aged-gold);
    margin: 0 auto;
    transform: skewX(-12deg);
}

/* Hero Decorative Slashes */
.hero-decoration {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.diagonal-slash {
    position: absolute;
    background: var(--burnt-orange);
    opacity: 0.06;
}

.diagonal-slash--1 {
    width: 2px;
    height: 60%;
    top: 10%;
    left: 15%;
    transform: skewX(-20deg);
}

.diagonal-slash--2 {
    width: 3px;
    height: 45%;
    top: 25%;
    right: 12%;
    transform: skewX(15deg);
}

.diagonal-slash--3 {
    width: 1px;
    height: 70%;
    top: 5%;
    right: 30%;
    transform: skewX(-25deg);
    background: var(--aged-gold);
    opacity: 0.08;
}

/* --- Section Header --- */
.section-header {
    margin-bottom: 3rem;
    padding: 0 2rem;
}

.section-icon {
    margin-bottom: 0.75rem;
    display: flex;
}

.section-title {
    margin-bottom: 0.75rem;
}

.section-border {
    width: 60px;
    height: 2px;
    background: var(--aged-gold);
    transform: skewX(-12deg);
    transition: width 0.6s ease;
}

/* --- Portfolio Grid --- */
.portfolio {
    max-width: 1280px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.portfolio-card {
    background: var(--soft-linen);
    padding: 2rem;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 260px;
}

.portfolio-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(26, 26, 78, 0.1);
}

.portfolio-card--featured {
    grid-column: span 2;
    clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 0 100%);
    min-height: 300px;
}

.card-marker {
    margin-bottom: 1.25rem;
    transition: transform 0.4s ease;
}

.portfolio-card:hover .card-marker {
    transform: rotate(15deg);
}

.card-content {
    flex: 1;
}

.card-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--burnt-orange);
    margin-bottom: 0.5rem;
    display: inline-block;
}

.card-title {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    margin-bottom: 0.75rem;
    color: var(--deep-indigo);
}

.card-desc {
    font-size: 0.9rem;
    color: var(--slate-blue);
    line-height: 1.6;
}

.card-index {
    position: absolute;
    bottom: 1rem;
    right: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 3rem;
    font-weight: 700;
    color: var(--deep-indigo);
    opacity: 0.06;
    line-height: 1;
}

/* Border-Animate */
.card-border-animate {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--burnt-orange), var(--aged-gold));
    background-size: 0% 2px;
    background-repeat: no-repeat;
    transition: background-size 0.5s ease;
}

.portfolio-card:hover .card-border-animate,
.process-step:hover .card-border-animate,
.contact-link:hover .card-border-animate,
[data-card]:hover .card-border-animate {
    background-size: 100% 2px;
}

/* --- About Section --- */
.about {
    background: var(--deep-indigo);
    padding: 6rem 0;
    clip-path: polygon(0 30px, 100% 0, 100% calc(100% - 30px), 0 100%);
}

.about-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
}

.about .section-title {
    color: var(--soft-linen);
}

.about .section-icon svg * {
    stroke: var(--burnt-orange);
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    color: rgba(245, 240, 229, 0.8);
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    position: relative;
    padding-left: 1rem;
    border-left: 2px solid var(--burnt-orange);
}

.stat-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--burnt-orange);
    line-height: 1;
}

.stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--aged-gold);
    margin-top: 0.25rem;
}

/* --- Process Section --- */
.process {
    max-width: 1280px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.process-step {
    background: var(--soft-linen);
    padding: 2.5rem 2rem;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
    transition: transform 0.3s ease;
}

.process-step:hover {
    transform: translateY(-3px);
}

.step-marker {
    margin-bottom: 1.5rem;
    transition: transform 0.4s ease;
}

.process-step:hover .step-marker {
    transform: rotate(12deg);
}

.step-title {
    margin-bottom: 0.75rem;
    color: var(--deep-indigo);
}

.step-desc {
    font-size: 0.9rem;
    color: var(--slate-blue);
    line-height: 1.6;
}

/* --- Contact Section --- */
.contact {
    background: var(--soft-linen);
    padding: 6rem 2rem;
    text-align: center;
    clip-path: polygon(0 0, 100% 20px, 100% 100%, 0 100%);
}

.contact-inner {
    max-width: 600px;
    margin: 0 auto;
}

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

.contact-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: var(--deep-indigo);
    margin-bottom: 1rem;
}

.contact-text {
    color: var(--slate-blue);
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
}

.contact-link {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--burnt-orange);
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--deep-indigo);
}

.contact-link .card-border-animate {
    position: relative;
    margin-top: 4px;
    height: 2px;
    background: linear-gradient(90deg, var(--burnt-orange), var(--aged-gold));
    background-size: 0% 2px;
    background-repeat: no-repeat;
    transition: background-size 0.5s ease;
}

/* --- Footer --- */
.site-footer {
    background: var(--deep-indigo);
    padding: 2rem;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-mark {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--soft-linen);
    opacity: 0.6;
}

.footer-tagline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--aged-gold);
    opacity: 0.5;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .portfolio-card--featured {
        grid-column: span 1;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about-stats {
        flex-direction: row;
        gap: 2rem;
    }

    .process-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .header-inner {
        flex-direction: column;
        gap: 0.75rem;
    }

    .main-nav {
        gap: 1.25rem;
    }

    .hero {
        padding-top: 10rem;
    }

    .about-stats {
        flex-direction: column;
    }

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