/* ================================
   VARIABLES & RESET
   ================================ */

:root {
    /* Color Palette */
    --color-bg-primary: #FAFAF9;
    --color-bg-secondary: #FFFFFF;
    --color-text-primary: #1A1A1A;
    --color-text-secondary: #525252;
    --color-text-tertiary: #737373;
    --color-accent: #DC2626;
    --color-accent-hover: #B91C1C;
    --color-border: #E5E5E5;
    --color-border-light: #F5F5F5;
    
    /* Typography */
    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'DM Sans', sans-serif;
    
    /* Spacing System */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    --space-2xl: 8rem;
    
    /* Layout */
    --container-max: 1280px;
    --content-max: 800px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 600ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ================================
   TYPOGRAPHY
   ================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-base);
}

ul {
    list-style: none;
}

/* ================================
   LAYOUT UTILITIES
   ================================ */

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

.section-header {
    margin-bottom: var(--space-xl);
    text-align: center;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.section-description {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ================================
   NAVIGATION
   ================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(250, 250, 249, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    transition: all var(--transition-base);
}

.nav.scrolled {
    background-color: rgba(250, 250, 249, 0.95);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-sm) var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    transition: color var(--transition-base);
}

.nav-logo:hover {
    color: var(--color-accent);
}

.nav-links {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

.nav-link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    position: relative;
    padding: 0.25rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active-section {
    color: var(--color-text-primary);
}

.nav-link:hover::after,
.nav-link.active-section::after {
    width: 100%;
}

.nav-link-cta {
    color: var(--color-accent);
    font-weight: 700;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--color-text-primary);
    transition: all var(--transition-base);
}

/* ================================
   INTRODUCTION SECTION
   ================================ */

.introduction {
    padding: calc(var(--space-2xl) + 60px) 0 var(--space-xl);
    background: linear-gradient(180deg, var(--color-bg-primary) 0%, var(--color-bg-secondary) 100%);
    position: relative;
}

.introduction-content {
    max-width: var(--content-max);
    margin: 0 auto;
    text-align: center;
}

.introduction-label {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-md);
    animation: fadeInUp 0.8s ease 0.1s both;
}

.introduction-name {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    margin-bottom: var(--space-md);
    position: relative;
    display: inline-block;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.introduction-name::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: var(--color-accent);
    animation: expandWidth 0.6s ease 0.8s both;
}

.introduction-roles {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.role-badge {
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.625rem 1.25rem;
    background-color: var(--color-bg-secondary);
    border: 2px solid var(--color-border);
    color: var(--color-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all var(--transition-base);
    animation: fadeInUp 0.8s ease both;
}

.role-badge:nth-child(1) { animation-delay: 0.4s; }
.role-badge:nth-child(2) { animation-delay: 0.5s; }
.role-badge:nth-child(3) { animation-delay: 0.6s; }

.role-badge:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.introduction-description {
    margin-top: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    text-align: left;
}

.introduction-description p {
    font-size: 1.125rem;
    line-height: 1.9;
    color: var(--color-text-secondary);
    animation: fadeInUp 0.8s ease both;
}

.introduction-description p:nth-child(1) { animation-delay: 0.7s; }
.introduction-description p:nth-child(2) { animation-delay: 0.9s; }

/* ================================
   HERO SECTION
   ================================ */

.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--space-xl) 0;
    background-color: var(--color-bg-secondary);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(220, 38, 38, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    text-align: center;
}

.hero-subtitle {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-md);
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
}

.hero-title-line {
    display: block;
    animation: fadeInUp 0.8s ease both;
}

.hero-title-line:nth-child(1) { animation-delay: 0.3s; }
.hero-title-line:nth-child(2) { animation-delay: 0.5s; }
.hero-title-line:nth-child(3) { animation-delay: 0.7s; }

.hero-text {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
    max-width: 700px;
    margin: 0 auto var(--space-lg);
    animation: fadeInUp 0.8s ease 0.9s both;
}

.hero-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 1.1s both;
}

/* ================================
   BUTTONS
   ================================ */

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 0.9375rem;
    font-weight: 700;
    font-family: var(--font-body);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: center;
}

.btn-primary {
    background-color: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-text-primary);
    border-color: var(--color-text-primary);
}

.btn-secondary:hover {
    background-color: var(--color-text-primary);
    color: var(--color-bg-primary);
}

/* ================================
   APPROACH SECTION
   ================================ */

.approach {
    padding: var(--space-2xl) 0;
    background-color: var(--color-bg-primary);
}

.approach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.approach-card {
    animation: fadeInUp 0.8s ease both;
}

.approach-card:nth-child(1) { animation-delay: 0.1s; }
.approach-card:nth-child(2) { animation-delay: 0.2s; }
.approach-card:nth-child(3) { animation-delay: 0.3s; }
.approach-card:nth-child(4) { animation-delay: 0.4s; }

.approach-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 300;
    color: var(--color-accent);
    margin-bottom: var(--space-sm);
    line-height: 1;
}

.approach-heading {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

.approach-text {
    color: var(--color-text-secondary);
    line-height: 1.8;
}

/* ================================
   PROJECTS SECTION
   ================================ */

.projects {
    padding: var(--space-2xl) 0;
    background-color: var(--color-bg-secondary);
}

.projects-grid {
    display: grid;
    gap: var(--space-lg);
}

.project-card {
    border: 1px solid var(--color-border);
    background-color: var(--color-bg-secondary);
    padding: var(--space-lg);
    transition: all var(--transition-base);
    animation: fadeInUp 0.8s ease both;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }

.project-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.project-header {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border-light);
}

.project-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
    flex-wrap: wrap;
}

.project-name {
    font-size: 2rem;
    font-weight: 700;
}

.project-status {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.75rem;
    border-radius: 2px;
    font-weight: 700;
    white-space: nowrap;
}

.status-live {
    background-color: rgba(34, 197, 94, 0.1);
    color: #16A34A;
}

.status-paused {
    background-color: rgba(250, 204, 21, 0.1);
    color: #CA8A04;
}

.project-tagline {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    font-style: italic;
}

.project-summary {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
}

.project-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.project-features h4,
.project-tech h4 {
    font-family: var(--font-body);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-sm);
    font-weight: 700;
}

.project-features ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.project-features li {
    color: var(--color-text-secondary);
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.project-features li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--color-accent);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.tech-badge {
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
    background-color: var(--color-border-light);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    font-weight: 500;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.tech-badge:hover {
    background-color: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
    transform: scale(1.05);
}

.projects-footer {
    margin-top: var(--space-xl);
}

.projects-note {
    padding: var(--space-md);
    background-color: var(--color-border-light);
    border-left: 3px solid var(--color-accent);
    color: var(--color-text-secondary);
    font-style: italic;
}

/* ================================
   EXPERTISE SECTION
   ================================ */

.expertise {
    padding: var(--space-2xl) 0;
    background-color: var(--color-bg-primary);
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.expertise-category {
    animation: fadeInUp 0.8s ease both;
}

.expertise-category:nth-child(1) { animation-delay: 0.1s; }
.expertise-category:nth-child(2) { animation-delay: 0.2s; }
.expertise-category:nth-child(3) { animation-delay: 0.3s; }
.expertise-category:nth-child(4) { animation-delay: 0.4s; }

.expertise-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-accent);
    display: inline-block;
}

.expertise-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.expertise-list li {
    color: var(--color-text-secondary);
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.expertise-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: bold;
}

/* ================================
   VISION SECTION
   ================================ */

.vision {
    padding: var(--space-2xl) 0;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.02) 0%, transparent 100%);
}

.vision-wrapper {
    max-width: var(--content-max);
    margin: 0 auto;
    text-align: center;
}

.vision-wrapper .section-title {
    margin-bottom: var(--space-lg);
    animation: fadeInUp 0.8s ease both;
}

.vision-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    text-align: left;
}

.vision-content p {
    font-size: 1.125rem;
    line-height: 1.9;
    color: var(--color-text-secondary);
    animation: fadeInUp 0.8s ease both;
}

.vision-content p:nth-child(1) { animation-delay: 0.2s; }
.vision-content p:nth-child(2) { animation-delay: 0.4s; }
.vision-content p:nth-child(3) { animation-delay: 0.6s; }

/* ================================
   CONTACT SECTION
   ================================ */

.contact {
    padding: var(--space-2xl) 0;
    background-color: var(--color-bg-secondary);
}

.contact-wrapper {
    max-width: var(--content-max);
    margin: 0 auto;
}

.contact-intro {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.contact-intro .section-title {
    animation: fadeInUp 0.8s ease both;
}

.contact-description {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    margin-top: var(--space-sm);
    animation: fadeInUp 0.8s ease 0.2s both;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.contact-item {
    animation: fadeInUp 0.8s ease both;
}

.contact-item:nth-child(1) { animation-delay: 0.3s; }
.contact-item:nth-child(2) { animation-delay: 0.4s; }
.contact-item:nth-child(3) { animation-delay: 0.5s; }
.contact-item:nth-child(4) { animation-delay: 0.6s; }

.contact-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-xs);
    font-weight: 500;
}

.contact-link {
    font-size: 1.125rem;
    color: var(--color-text-primary);
    font-weight: 500;
    display: inline-block;
    position: relative;
}

.contact-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width var(--transition-base);
}

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

.contact-link:hover::after {
    width: 100%;
}

.contact-text {
    font-size: 1.125rem;
    color: var(--color-text-primary);
    font-weight: 500;
}

/* ================================
   FOOTER
   ================================ */

.footer {
    padding: var(--space-xl) 0 var(--space-md);
    background-color: var(--color-text-primary);
    color: var(--color-bg-primary);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(250, 250, 249, 0.1);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.footer-tagline {
    color: rgba(250, 250, 249, 0.6);
    font-size: 0.9375rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-lg);
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-heading {
    font-family: var(--font-body);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(250, 250, 249, 0.6);
    margin-bottom: var(--space-xs);
    font-weight: 700;
}

.footer-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.footer-list a {
    color: rgba(250, 250, 249, 0.8);
    transition: color var(--transition-base);
    font-size: 0.9375rem;
}

.footer-list a:hover {
    color: var(--color-bg-primary);
}

.footer-list li {
    color: rgba(250, 250, 249, 0.6);
    font-size: 0.9375rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.footer-copyright,
.footer-domain {
    font-size: 0.875rem;
    color: rgba(250, 250, 249, 0.6);
}

/* ================================
   ANIMATIONS
   ================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes expandWidth {
    from {
        opacity: 0;
        width: 0;
    }
    to {
        opacity: 1;
        width: 60px;
    }
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

@media (max-width: 1024px) {
    .project-details {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --space-lg: 3rem;
        --space-xl: 4rem;
        --space-2xl: 5rem;
    }
    
    .introduction {
        padding: calc(var(--space-xl) + 60px) 0 var(--space-lg);
    }
    
    .introduction-name::after {
        width: 40px;
    }
    
    .introduction-description,
    .vision-content {
        text-align: left;
    }
    
    .introduction-description p,
    .vision-content p {
        font-size: 1rem;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--color-bg-secondary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--space-lg);
        transition: right var(--transition-base);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    .hero {
        min-height: 80vh;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
    
    .approach-grid,
    .expertise-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-sm);
    }
    
    .role-badge {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }
    
    .introduction-name {
        font-size: 2.5rem;
    }
    
    .project-card {
        padding: var(--space-md);
    }
    
    .project-name {
        font-size: 1.5rem;
    }
    
    .project-title-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ================================
   ACCESSIBILITY
   ================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
}

/* ================================
   PRINT STYLES
   ================================ */

@media print {
    .nav,
    .hero-actions,
    .footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
