/* ============================================
   Editorial Resume - Portfolio Styles
   ============================================ */

/* CSS Custom Properties */
:root {
    /* Colors - Dark & Elegant Theme */
    --bg-primary: #0D0D0D;
    --bg-secondary: #1A1A1A;
    --text-primary: #F5F5F5;
    --text-secondary: #A0A0A0;
    --text-muted: #666666;
    --accent: #D4A84B;
    --accent-hover: #E8C068;
    --border: #2A2A2A;
    --border-dark: #3A3A3A;

    /* Typography */
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;

    /* Layout */
    --max-width: 1100px;
    --content-width: 720px;
}

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

html {
    scroll-behavior: smooth;
}

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

/* Subtle Noise Texture Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    z-index: 1000;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 400;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

p {
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
}

/* Links */
a {
    color: var(--accent);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
}

/* Animated underline for links */
.link-underline {
    position: relative;
    display: inline-block;
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

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

/* Layout Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ============================================
   Header / Hero Section
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-2xl) 0;
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.hero-text {
    max-width: 540px;
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: var(--space-sm);
}

.hero-name {
    margin-bottom: var(--space-sm);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 400;
    color: var(--text-secondary);
    font-style: italic;
}

.hero-description {
    margin-top: var(--space-md);
    font-size: 1.0625rem;
    max-width: 480px;
}

/* Navigation Dots */
.nav-dots {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    position: fixed;
    right: var(--space-lg);
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid var(--border-dark);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-dot:hover,
.nav-dot.active {
    background: var(--accent);
    border-color: var(--accent);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.scroll-indicator::after {
    content: '';
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--text-muted), transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.2); }
}

/* ============================================
   Section Styles
   ============================================ */
.section {
    padding: var(--space-2xl) 0;
    border-top: 1px solid var(--border);
}

.section-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.section-header h2 {
    margin-bottom: 0;
}

.section-line {
    flex: 1;
    height: 1px;
    background: var(--border);
    position: relative;
    overflow: hidden;
}

.section-line::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: var(--accent);
    transition: width 0.8s ease-out;
}

.section.in-view .section-line::before {
    width: 60px;
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--space-xl);
}

.column-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    padding-top: 0.25rem;
}

/* ============================================
   About Section
   ============================================ */
.about-content p {
    font-size: 1.0625rem;
    line-height: 1.8;
    max-width: var(--content-width);
}

.about-content p:last-child {
    margin-bottom: 0;
}

/* ============================================
   Experience Section
   ============================================ */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.experience-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: var(--space-lg);
    padding: var(--space-md);
    border-radius: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.experience-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.experience-date {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.experience-details h3 {
    margin-bottom: var(--space-xs);
}

.experience-company {
    font-size: 0.9375rem;
    color: var(--accent);
    margin-bottom: var(--space-sm);
}

.experience-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.experience-highlights {
    list-style: none;
    padding-left: 0;
}

.experience-highlights li {
    position: relative;
    padding-left: var(--space-md);
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.experience-highlights li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 1px;
    background: var(--accent);
}

/* ============================================
   Skills Section
   ============================================ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.skill-category {
    padding: var(--space-md);
}

.skill-category h3 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
    font-family: var(--font-body);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.skill-tag {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 2px;
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.skill-tag:hover {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
    transform: scale(1.02);
}

/* ============================================
   Certifications Section
   ============================================ */
.certifications-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.certification-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.certification-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--accent);
}

.certification-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: white;
    border-radius: 4px;
    font-size: 1.25rem;
}

.certification-details h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.certification-details p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* ============================================
   Contact Section
   ============================================ */
.contact-content {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.contact-content p {
    font-size: 1.125rem;
    margin-bottom: var(--space-lg);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-dark);
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-link:hover {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* ============================================
   Animations
   ============================================ */

/* Page Load Animations */
.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.8s ease forwards;
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* Staggered Animation Delays */
.animate-stagger > *:nth-child(1) { animation-delay: 0ms; }
.animate-stagger > *:nth-child(2) { animation-delay: 100ms; }
.animate-stagger > *:nth-child(3) { animation-delay: 200ms; }
.animate-stagger > *:nth-child(4) { animation-delay: 300ms; }
.animate-stagger > *:nth-child(5) { animation-delay: 400ms; }
.animate-stagger > *:nth-child(6) { animation-delay: 500ms; }

/* Scroll-Triggered Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered scroll animations for children */
.animate-stagger-scroll > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.animate-stagger-scroll.in-view > *:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0ms; }
.animate-stagger-scroll.in-view > *:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 100ms; }
.animate-stagger-scroll.in-view > *:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 200ms; }
.animate-stagger-scroll.in-view > *:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 300ms; }
.animate-stagger-scroll.in-view > *:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 400ms; }
.animate-stagger-scroll.in-view > *:nth-child(6) { opacity: 1; transform: translateY(0); transition-delay: 500ms; }

/* Scale-in animation for skill tags */
.skill-tag {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.in-view .skill-tag {
    opacity: 1;
    transform: scale(1);
}

.in-view .skill-tags .skill-tag:nth-child(1) { transition-delay: 0ms; }
.in-view .skill-tags .skill-tag:nth-child(2) { transition-delay: 50ms; }
.in-view .skill-tags .skill-tag:nth-child(3) { transition-delay: 100ms; }
.in-view .skill-tags .skill-tag:nth-child(4) { transition-delay: 150ms; }
.in-view .skill-tags .skill-tag:nth-child(5) { transition-delay: 200ms; }
.in-view .skill-tags .skill-tag:nth-child(6) { transition-delay: 250ms; }
.in-view .skill-tags .skill-tag:nth-child(7) { transition-delay: 300ms; }
.in-view .skill-tags .skill-tag:nth-child(8) { transition-delay: 350ms; }

/* Nav dot scale animation */
.nav-dot {
    opacity: 0;
    transform: scale(0);
}

.nav-dots.loaded .nav-dot {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-dots.loaded .nav-dot:nth-child(1) { transition-delay: 300ms; }
.nav-dots.loaded .nav-dot:nth-child(2) { transition-delay: 350ms; }
.nav-dots.loaded .nav-dot:nth-child(3) { transition-delay: 400ms; }
.nav-dots.loaded .nav-dot:nth-child(4) { transition-delay: 450ms; }
.nav-dots.loaded .nav-dot:nth-child(5) { transition-delay: 500ms; }

/* Scroll indicator animation */
.scroll-indicator {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.scroll-indicator.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .animate-on-scroll,
    .animate-stagger-scroll > *,
    .skill-tag,
    .nav-dot,
    .scroll-indicator {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .hero-description {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .nav-dots {
        display: none;
    }

    .two-column {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .column-label {
        margin-bottom: var(--space-xs);
    }

    .experience-card {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
}

@media (max-width: 600px) {
    :root {
        --space-lg: 1.5rem;
        --space-xl: 2.5rem;
        --space-2xl: 3.5rem;
    }

    .container {
        padding: 0 var(--space-sm);
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .section-line {
        width: 60px;
    }

    .section.in-view .section-line::before {
        width: 100%;
    }

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

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .scroll-indicator {
        display: none;
    }
}
