/* ============================================
   KstrDevelopment — Portfolio
   Warm Editorial Style
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Serif+Display&display=swap');

:root {
    --bg: #faf8f5;
    --bg-alt: #f0ece6;
    --surface: #ffffff;
    --text: #1a1a1a;
    --text-body: #4a4a4a;
    --text-muted: #8a8580;
    --accent: #d45a1f;
    --accent-soft: rgba(212, 90, 31, .08);
    --border: #e5e0d8;
    --radius: 12px;
    --transition: .25s ease;
    --serif: 'DM Serif Display', Georgia, serif;
    --sans: 'DM Sans', system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    display: block;
    max-width: 100%;
}

::selection {
    background: var(--accent);
    color: #fff;
}

/* --- CONTAINER --- */
.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 28px;
}

/* Scroll-reveal */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s cubic-bezier(.22, 1, .36, 1), transform .6s cubic-bezier(.22, 1, .36, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for grouped reveals */
.reveal.stagger-1 {
    transition-delay: .08s;
}

.reveal.stagger-2 {
    transition-delay: .16s;
}

.reveal.stagger-3 {
    transition-delay: .24s;
}

.reveal.stagger-4 {
    transition-delay: .32s;
}

.reveal.stagger-5 {
    transition-delay: .40s;
}

/* Page load fade */
@keyframes page-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

body {
    animation: page-fade-in .5s ease;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(250, 248, 245, .9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-family: var(--serif);
    font-size: 1.4rem;
    color: var(--text);
    letter-spacing: -.01em;
}

.logo em {
    font-style: normal;
    color: var(--accent);
}

/* Nav */
.nav-list {
    display: flex;
    gap: 28px;
}

.nav-list a {
    font-size: .88rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--transition);
    letter-spacing: .01em;
}

.nav-list a:hover {
    color: var(--text);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    padding: 160px 0 100px;
}

/* Hero entrance animations */
.hero-eyebrow,
.hero h1,
.hero-description,
.hero .divider,
.hero-actions {
    opacity: 0;
    transform: translateY(20px);
    animation: hero-enter .7s cubic-bezier(.22, 1, .36, 1) forwards;
}

.hero-eyebrow {
    animation-delay: .1s;
}

.hero h1 {
    animation-delay: .25s;
}

.hero-description {
    animation-delay: .4s;
}

.hero .divider {
    animation-delay: .55s;
}

.hero-actions {
    animation-delay: .65s;
}

@keyframes hero-enter {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-eyebrow {
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
}

.hero h1 {
    font-family: var(--serif);
    font-size: clamp(2.6rem, 6vw, 4rem);
    line-height: 1.1;
    letter-spacing: -.02em;
    margin-bottom: 24px;
    color: var(--text);
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-body);
    max-width: 520px;
    margin-bottom: 40px;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

/* Divider line — animated grow */
.divider {
    width: 0;
    height: 2px;
    background: var(--accent);
    border: none;
    margin: 0;
    animation: divider-grow .6s cubic-bezier(.22, 1, .36, 1) .6s forwards;
}

@keyframes divider-grow {
    to {
        width: 48px;
    }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    font-family: var(--sans);
    font-size: .88rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn-primary {
    background: var(--text);
    color: var(--bg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 26, 26, .15);
}

.btn-outline {
    background: transparent;
    color: var(--text-body);
    border: 1.5px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--text);
    color: var(--text);
    transform: translateY(-2px);
}

.btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: 80px 0;
}

.section-label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.section-title {
    font-family: var(--serif);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    letter-spacing: -.01em;
    margin-bottom: 48px;
    line-height: 1.2;
    color: var(--text);
}

/* ============================================
   PROJECTS
   ============================================ */
.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    display: flex;
    gap: 28px;
    align-items: flex-start;
    transition: box-shadow var(--transition), transform var(--transition);
}

.project-card:hover {
    transform: translateY(-5px) scale(1.005);
    box-shadow: 0 16px 48px rgba(0, 0, 0, .08);
}

.project-card:active {
    transform: translateY(-2px) scale(.998);
    transition-duration: .1s;
}

.project-card+.project-card {
    margin-top: 20px;
}

.app-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.project-info {
    flex: 1;
}

.project-info h3 {
    font-family: var(--serif);
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--text);
}

.project-info p {
    color: var(--text-body);
    font-size: .92rem;
    margin-bottom: 16px;
    line-height: 1.7;
}

.project-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.project-tags span {
    font-size: .72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 5px;
    background: var(--accent-soft);
    color: var(--accent);
    letter-spacing: .02em;
}

.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: var(--bg-alt);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 600;
    transition: border-color var(--transition), background var(--transition);
}

.store-badge:hover {
    border-color: var(--text-muted);
    background: var(--surface);
}

.store-badge svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ============================================
   TECH STACK
   ============================================ */
.stack-section {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 14px;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    transition: transform var(--transition);
}

.tech-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .05);
}

.tech-item:hover .tech-icon-img {
    transform: scale(1.15) rotate(-3deg);
}

.tech-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.tech-icon-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    transition: transform var(--transition);
}

.tech-item .tech-name {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-body);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 56px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    margin-bottom: 0;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: .88rem;
    margin-top: 12px;
    max-width: 280px;
    line-height: 1.65;
}

.footer-col h4 {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col a {
    font-size: .88rem;
    color: var(--text-body);
    transition: color var(--transition);
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .78rem;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--text-muted);
    transition: color var(--transition);
}

.footer-bottom a:hover {
    color: var(--accent);
}

/* ============================================
   PAGE CONTENT (Privacy, Delete Account)
   ============================================ */
.page-content {
    padding: 120px 0 80px;
    min-height: 60vh;
}

.page-content h1 {
    font-family: var(--serif);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    margin-bottom: 8px;
    color: var(--text);
}

.page-content .page-subtitle {
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: .88rem;
}

.page-content h2 {
    font-family: var(--serif);
    font-size: 1.2rem;
    margin-top: 36px;
    margin-bottom: 10px;
    color: var(--text);
}

.page-content p {
    color: var(--text-body);
    margin-bottom: 16px;
    font-size: .92rem;
}

.page-content ul,
.page-content ol {
    margin-left: 20px;
    margin-bottom: 20px;
    color: var(--text-body);
    font-size: .92rem;
}

.page-content ol {
    list-style: decimal;
}

.page-content ul {
    list-style: disc;
}

.page-content li {
    margin-bottom: 6px;
    line-height: 1.7;
}

.page-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(212, 90, 31, .3);
    transition: text-decoration-color var(--transition);
}

.page-content a:hover {
    text-decoration-color: var(--accent);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-list {
        position: fixed;
        top: 0;
        right: -100%;
        width: 260px;
        height: 100vh;
        background: var(--bg);
        flex-direction: column;
        padding: 90px 36px 36px;
        gap: 20px;
        transition: right var(--transition);
        border-left: 1px solid var(--border);
        box-shadow: -8px 0 30px rgba(0, 0, 0, .05);
    }

    .nav-list.open {
        right: 0;
    }

    .nav-list a {
        font-size: 1.05rem;
        color: var(--text);
    }

    .hero {
        padding: 130px 0 60px;
    }

    .project-card {
        flex-direction: column;
    }

    .app-icon {
        width: 56px;
        height: 56px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }

    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}