/* ============================================
   SAHAR MAHBOBI — Portfolio
   Aesthetic, creative, animation-rich
   ============================================ */

:root {
    /* Color palette — light, warm, friendly, soft feminine touches */
    --bg-dark: #faf8f5;
    --bg-card: #fffdfb;
    --bg-elevated: #ffffff;
    --text-primary: #2d2a26;
    --text-secondary: #6b6560;
    --text-muted: #9a938c;
    --accent: #c99090;
    --accent-dim: rgba(201, 144, 144, 0.2);
    --accent-hover: #b87a7a;
    --border: rgba(45, 42, 38, 0.08);
    --gradient-1: linear-gradient(135deg, #fdfbf9 0%, #faf6f2 50%, #f5efe8 100%);
    --gradient-accent: linear-gradient(135deg, #d4a5a5 0%, #c99090 100%);
    --shadow-glow: 0 0 60px rgba(201, 144, 144, 0.15);
    --shadow-soft: 0 4px 24px rgba(45, 42, 38, 0.06);
    
    /* Typography */
    --font-display: 'Fraunces', serif;
    --font-body: 'DM Sans', sans-serif;
    
    /* Spacing & Layout */
    --container-max: 1200px;
    --section-padding: clamp(4rem, 10vw, 8rem);
    --nav-height: 80px;
    
    /* Transitions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-dark);
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s var(--ease-out-expo);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   Background Effects
   ============================================ */

.bg-gradient {
    position: fixed;
    inset: 0;
    background: var(--gradient-1);
    z-index: -2;
    pointer-events: none;
}

.bg-grid {
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(rgba(45, 42, 38, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(45, 42, 38, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -1;
    pointer-events: none;
}

.floating-shapes {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.shape-1 { width: 400px; height: 400px; background: rgba(212, 165, 165, 0.25); top: -10%; right: -5%; animation-delay: 0s; }
.shape-2 { width: 300px; height: 300px; background: rgba(201, 144, 144, 0.15); bottom: 20%; left: -10%; animation-delay: -5s; }
.shape-3 { width: 250px; height: 250px; background: rgba(184, 122, 122, 0.12); top: 50%; left: 50%; animation-delay: -10s; }
.shape-4 { width: 200px; height: 200px; background: rgba(212, 165, 165, 0.2); bottom: -5%; right: 20%; animation-delay: -3s; }
.shape-5 { width: 350px; height: 350px; background: rgba(201, 144, 144, 0.1); top: 30%; right: 30%; animation-delay: -7s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 30px) scale(1.02); }
}

/* ============================================
   Navigation
   ============================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(1.5rem, 5vw, 3rem);
    z-index: 1000;
    background: rgba(250, 248, 245, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo);
}

.nav.scrolled {
    border-bottom-color: var(--border);
}

.nav-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    transition: color 0.3s, transform 0.3s var(--ease-spring);
}

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

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s var(--ease-out-expo);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

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

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: transform 0.3s var(--ease-out-expo), opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--nav-height) 2rem 4rem;
    position: relative;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-hover);
    border: 1px solid rgba(201, 144, 144, 0.35);
    border-radius: 100px;
    background: var(--accent-dim);
    margin-bottom: 2rem;
    animation: fadeUp 0.8s var(--ease-out-expo) 0.2s both;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(3.5rem, 12vw, 8rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.hero-title .line {
    display: block;
    overflow: hidden;
}

.hero-title .word {
    display: inline-block;
    transform: translateY(110%);
    animation: revealWord 1s var(--ease-out-expo) forwards;
}

.hero-title .line:nth-child(1) .word { animation-delay: 0.4s; }
.hero-title .line:nth-child(2) .word { animation-delay: 0.55s; }

@keyframes revealWord {
    to { transform: translateY(0); }
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 2.5rem;
    animation: fadeUp 0.8s var(--ease-out-expo) 0.7s both;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeUp 0.8s var(--ease-out-expo) 0.9s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s var(--ease-out-expo);
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-accent);
    color: #fff;
    border: none;
    box-shadow: 0 4px 20px rgba(201, 144, 144, 0.35);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(201, 144, 144, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: fadeIn 1s 1.2s both;
}

.scroll-indicator {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(201, 144, 144, 0.4);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.scroll-dot {
    width: 4px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(8px); opacity: 0.5; }
}

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

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

/* ============================================
   Section Common
   ============================================ */

.section {
    padding: var(--section-padding) 0;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 3rem);
}

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 3rem;
}

/* Reveal animation — controlled by JS */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   About Section
   ============================================ */

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

.about-text {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 540px;
}

.about-stats {
    display: flex;
    gap: 3rem;
    margin-top: 2.5rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    display: inline-flex;
    white-space: nowrap;
    align-items: baseline;
}

.stat-value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2.5rem;
    color: var(--accent);
    line-height: 1;
}

.stat-suffix {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2rem;
    color: var(--accent);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.5s var(--ease-out-expo), box-shadow 0.5s var(--ease-out-expo);
}

.about-card:hover {
    transform: translateY(-8px) rotate(-1deg);
    box-shadow: var(--shadow-glow), var(--shadow-soft);
}

.about-card-inner {
    text-align: center;
}

.engineering-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    color: var(--accent);
    opacity: 0.9;
    animation: rotateGear 20s linear infinite;
}

@keyframes rotateGear {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.engineering-icon svg {
    width: 100%;
    height: 100%;
}

.about-card p {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.degree {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ============================================
   Projects Section
   ============================================ */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

.project-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.5s var(--ease-out-expo);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(201, 144, 144, 0.3);
    box-shadow: var(--shadow-glow), var(--shadow-soft);
}

.project-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(180deg, rgba(201, 144, 144, 0.12) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.project-card:hover .project-card-bg {
    opacity: 1;
}

.project-number {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 3rem;
    color: var(--accent);
    opacity: 0.2;
    line-height: 1;
    pointer-events: none;
}

.project-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    position: relative;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    position: relative;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tags span {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 100px;
}

.project-link {
    font-weight: 600;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s var(--ease-out-expo);
}

.project-link:hover {
    gap: 0.75rem;
}

/* ============================================
   Leadership Section
   ============================================ */

.leadership-timeline {
    max-width: 700px;
    margin: 0 auto;
}

.leadership-item {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 2rem;
    padding-bottom: 2.5rem;
    position: relative;
}

.leadership-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 40px;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent) 0%, transparent 100%);
    opacity: 0.3;
}

.leadership-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 2px solid var(--accent);
    flex-shrink: 0;
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
}

.leadership-item:hover .leadership-dot {
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(201, 144, 144, 0.35);
}

.leadership-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.leadership-content h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.leadership-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ============================================
   Contact Section
   ============================================ */

.contact-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all 0.4s var(--ease-out-expo);
}

.contact-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow), 0 10px 40px rgba(45, 42, 38, 0.08);
}

.contact-icon {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.contact-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

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

.contact-footer {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .about-visual {
        order: -1;
    }
    
    .about-stats {
        flex-wrap: wrap;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav.open .nav-links {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(250, 248, 245, 0.98);
        padding: 2rem;
        gap: 1rem;
    }
    
    .hero-title {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .leadership-item {
        grid-template-columns: 30px 1fr;
        gap: 1.25rem;
    }
    
    .leadership-item:not(:last-child)::before {
        left: 14px;
    }
    
    .leadership-dot {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* ============================================
   Project Report Pages
   ============================================ */

.report-hero {
    padding: calc(var(--nav-height) + 4rem) 2rem 3rem;
    text-align: center;
}

.report-hero .back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    transition: color 0.3s, gap 0.3s;
}

.report-hero .back-link:hover {
    color: var(--accent);
    gap: 0.75rem;
}

.report-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.report-hero .report-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.report-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 3rem) 4rem;
}

.report-content h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.report-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.report-content ul {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.report-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.report-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.report-tags span {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.3rem 0.65rem;
    background: var(--accent-dim);
    color: var(--accent-hover);
    border-radius: 100px;
}
