/* ================================
   MODERN DARK PORTFOLIO — 2025
   Inspired by proception.ai aesthetic
   ================================ */

:root {
    --white: #ffffff;
    --off-white: #f5f5f5;
    --zinc-50: #fafafa;
    --zinc-100: #f4f4f5;
    --zinc-200: #e4e4e7;
    --zinc-300: #d4d4d8;
    --zinc-400: #a1a1aa;
    --zinc-500: #71717a;
    --zinc-600: #52525b;
    --zinc-700: #3f3f46;
    --zinc-800: #27272a;
    --zinc-850: #1e1e21;
    --zinc-900: #18181b;
    --zinc-950: #09090b;
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Georgia', 'Times New Roman', serif;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--zinc-950);
    color: var(--zinc-300);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle noise overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

::selection {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

/* ================================
   SCROLL REVEAL ANIMATIONS
   ================================ */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.9s var(--ease-out-expo), transform 0.9s var(--ease-out-expo);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

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

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes lineExpand {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* ================================
   NAV
   ================================ */

nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: transparent;
    backdrop-filter: blur(0px);
    display: flex;
    justify-content: center;
    padding: 1.5rem 2rem;
    z-index: 1000;
    gap: 3rem;
    transition: all 0.5s var(--ease-out-expo);
    border-bottom: 1px solid transparent;
}

nav.scrolled {
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
}

nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
}

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

nav a:hover {
    color: var(--white);
}

nav a:hover::after {
    width: 100%;
}

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

.home-hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--zinc-950);
    color: var(--white);
    overflow: hidden;
}

/* Canvas — robotics blueprint */
#hero-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Edge fades */
.home-hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 280px;
    background: linear-gradient(to bottom, transparent, var(--zinc-950));
    z-index: 5;
    pointer-events: none;
}

.home-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, transparent, rgba(9, 9, 11, 0.4));
    z-index: 5;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    padding: 2rem;
    pointer-events: none;
}

.hero-content a,
.hero-content button {
    pointer-events: auto;
}

/* Eyebrow */
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem 0.4rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--zinc-400);
    letter-spacing: 0.3px;
    font-weight: 500;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeInUp 1s var(--ease-out-expo) 0.1s both;
}

.hero-eyebrow-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22d3ee;
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(34, 211, 238, 0.5); }
    50% { opacity: 0.6; box-shadow: 0 0 16px rgba(34, 211, 238, 0.3); }
}

.home-hero h1 {
    font-size: 6.5rem;
    font-weight: 800;
    letter-spacing: -4px;
    line-height: 0.95;
    margin-bottom: 1.5rem;
    font-family: var(--font-sans);
    background: linear-gradient(180deg, var(--white) 20%, var(--zinc-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1.2s var(--ease-out-expo) 0.2s both;
}

.home-hero .subtitle {
    font-size: 1.2rem;
    color: var(--zinc-400);
    margin-bottom: 2rem;
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: 0.2px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1.2s var(--ease-out-expo) 0.4s both;
}

/* Credential tags */
.hero-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
    animation: fadeInUp 1.2s var(--ease-out-expo) 0.6s both;
}

.hero-tag {
    padding: 0.3rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--zinc-400);
    letter-spacing: 0.3px;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
}

.hero-tag:hover {
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--zinc-200);
    background: rgba(255, 255, 255, 0.06);
}

/* Hero action buttons */
.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    animation: fadeInUp 1.2s var(--ease-out-expo) 0.8s both;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.8rem;
    background: var(--white);
    color: var(--zinc-950);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0), 0 1px 2px rgba(0, 0, 0, 0.3);
}

.cta-button svg {
    transition: transform 0.3s var(--ease-out-expo);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.08), 0 8px 30px rgba(0, 0, 0, 0.3);
    background: var(--zinc-100);
}

.cta-button:hover svg {
    transform: translate(2px, -2px);
}

.cta-button--ghost {
    background: transparent;
    color: var(--zinc-300);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.cta-button--ghost:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--white);
    box-shadow: none;
}

/* Scroll indicator — mouse icon */
.scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    animation: fadeIn 1s var(--ease-out-expo) 1.5s both;
}

.scroll-mouse {
    width: 22px;
    height: 34px;
    border: 2px solid var(--zinc-700);
    border-radius: 12px;
    position: relative;
    display: flex;
    justify-content: center;
}

.scroll-wheel {
    width: 3px;
    height: 8px;
    background: var(--zinc-500);
    border-radius: 3px;
    margin-top: 6px;
    animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
    0% { opacity: 1; transform: translateY(0); }
    50% { opacity: 0.3; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

.scroll-indicator span {
    font-size: 0.6rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--zinc-600);
    font-weight: 500;
}

/* ================================
   SECTIONS
   ================================ */

section {
    padding: 8rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -1.5px;
    font-family: var(--font-sans);
    color: var(--white);
    line-height: 1.1;
}

.section-intro {
    color: var(--zinc-500);
    margin-bottom: 4rem;
    font-size: 1.05rem;
    max-width: 550px;
    line-height: 1.8;
}

h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--zinc-100);
    margin-bottom: 0.5rem;
}

p {
    color: var(--zinc-400);
    line-height: 1.8;
    font-size: 1rem;
}

/* Section divider */
.section-line {
    width: 40px;
    height: 2px;
    background: var(--zinc-700);
    margin-bottom: 1.5rem;
}

/* ================================
   ABOUT
   ================================ */

#about {
    padding-top: 10rem;
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 5rem;
    align-items: start;
}

.about-image {
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--zinc-900);
    position: relative;
    border-radius: 8px;
}

.about-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('matt-profile.jpg') center/cover;
    transition: transform 0.8s var(--ease-out-expo);
}

.about-image:hover::before {
    transform: scale(1.03);
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    color: var(--zinc-400);
}

.about-text strong {
    color: var(--white);
    font-weight: 600;
}

.stats-grid {
    display: flex;
    gap: 4rem;
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
}

.stat-card { text-align: left; }

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
    margin-bottom: 0.4rem;
    font-family: var(--font-sans);
}

.stat-label {
    color: var(--zinc-600);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

/* ================================
   PORTFOLIO
   ================================ */

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

.portfolio-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    background: var(--zinc-900);
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: transform 0.4s var(--ease-out-expo), border-color 0.4s ease;
}

.portfolio-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-light);
}

.portfolio-image-wrapper {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.portfolio-image {
    position: absolute;
    inset: 0;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.5s var(--ease-out-expo);
}

.portfolio-card:hover .portfolio-image {
    transform: scale(1.03);
}

/* 9 cards remain after hiding Cibus, Dune Buggy, Random Projects */
.portfolio-card:nth-child(1) .portfolio-image { background-image: url('war-strike-4.jpg'); background-position: center 30%; }
.portfolio-card:nth-child(2) .portfolio-image { background-image: url('robotic-arm.jpg'); }
.portfolio-card:nth-child(3) .portfolio-image { background-image: url('ball-shooter-1.jpg'); background-position: center 40%; }
.portfolio-card:nth-child(4) .portfolio-image { background-image: url('vla-model-setup.png'); }
.portfolio-card:nth-child(5) .portfolio-image { background-image: url('tactile-sensor-photo-IMG_2802.jpg'); background-position: center 30%; }
.portfolio-card:nth-child(6) .portfolio-image { background-image: url('visenty-dashboard.png'); }
.portfolio-card:nth-child(7) .portfolio-image { background-image: url('anechoic-chamber1.jpg'); }
.portfolio-card:nth-child(8) .portfolio-image { background-image: url('pharmacy-project.jpg'); }
.portfolio-card:nth-child(9) .portfolio-image { background-image: url('drone-case1.jpg'); }
.portfolio-card:nth-child(10) .portfolio-image { background-image: url('3Dalive.jpeg'); }
.portfolio-card:nth-child(11) .portfolio-image { background-image: url('injection-mold-2.jpg'); background-position: center center; }
.portfolio-card:nth-child(12) .portfolio-image { background-image: url('vtol-1.png'); background-position: center center; }

.portfolio-overlay {
    padding: 1.2rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.portfolio-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--zinc-100);
    margin-bottom: 0;
}

.portfolio-description {
    font-size: 0.8rem;
    color: var(--zinc-500);
    line-height: 1.5;
}

.portfolio-label {
    position: absolute;
    top: 0.8rem;
    left: 0.8rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--white);
    padding: 0.25rem 0.65rem;
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 3;
    border-radius: 4px;
}

/* ================================
   APPS SHOWCASE
   ================================ */

.app-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: center;
    padding: 3.5rem 0;
    border-bottom: 1px solid var(--border);
}

.app-showcase--flip {
    direction: rtl;
}
.app-showcase--flip > * {
    direction: ltr;
}

/* Phone mockup cluster */
.app-phones {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1rem;
}

.app-phone {
    width: 120px;
    flex-shrink: 0;
    border-radius: 28px;
    border: 1.5px solid rgba(255,255,255,0.1);
    overflow: hidden;
    background: #050505;
    box-shadow: 0 24px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.05);
    transition: transform 0.4s var(--ease-out-expo);
}

.app-phone:hover {
    transform: translateY(-6px) scale(1.02) !important;
}

.app-phone--raised {
    transform: translateY(-20px);
}

.app-phone img {
    width: 100%;
    height: auto;
    display: block;
    background: var(--zinc-900);
    min-height: 220px;
}

/* Hide broken image icon when src is missing */
.app-phone img[src="bold-af-home.png"]:not([src=""]),
.app-phone img[src="bold-af-challenge-detail.png"]:not([src=""]),
.app-phone img[src="bold-af-challenges-complete.png"]:not([src=""]),
.app-phone img[src="bold-af-profile.png"]:not([src=""]) {
    background: var(--zinc-900);
}

/* App text info */
.app-badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #22d3ee;
    margin-bottom: 0.9rem;
}

.app-badge--latest {
    color: #a78bfa;
}

.app-info h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -1px;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.app-info p {
    color: var(--zinc-400);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    max-width: 480px;
}

.app-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}

.app-meta-chip {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--zinc-500);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.25rem 0.65rem;
}

.app-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--zinc-300);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    padding-bottom: 2px;
    transition: all 0.3s ease;
}

.app-link:hover {
    color: var(--white);
    border-bottom-color: var(--white);
}

/* Journey strip */
.apps-journey {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border);
}

.apps-journey-inner {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.apps-journey-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.apps-journey-num {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1;
    background: linear-gradient(180deg, var(--white) 0%, var(--zinc-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.apps-journey-label {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--zinc-600);
    margin-top: 0.4rem;
    white-space: nowrap;
}

.apps-journey-divider {
    width: 1px;
    height: 60px;
    background: var(--border);
    flex-shrink: 0;
}

.apps-journey-copy {
    flex: 1;
}

.apps-journey-copy p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--zinc-400);
}

.apps-journey-copy strong {
    color: var(--zinc-200);
}

/* Responsive */
@media (max-width: 900px) {
    .app-showcase,
    .app-showcase--flip {
        grid-template-columns: 1fr;
        gap: 3rem;
        direction: ltr;
    }
    .app-phones { order: -1; }
    .app-phone { width: 120px; border-radius: 22px; }
    .app-info h3 { font-size: 1.8rem; }
    .apps-journey-inner { flex-wrap: wrap; gap: 2rem; }
    .apps-journey-divider { display: none; }
}

@media (max-width: 480px) {
    .app-phone { width: 100px; border-radius: 18px; }
    .app-phones { gap: 0.6rem; }
}

/* ================================
   THE REST OF IT
   ================================ */

.also-built-statement {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--zinc-400);
    max-width: 780px;
    margin-bottom: 4rem;
}

.also-built-statement strong {
    color: var(--zinc-100);
    font-weight: 600;
}

.also-built-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--border);
}

.also-card {
    background: var(--zinc-950);
    padding: 1.6rem 1.8rem;
    transition: background 0.3s ease;
}

.also-card:hover {
    background: rgba(255, 255, 255, 0.025);
}

.also-tag {
    display: inline-block;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 4px;
    padding: 0.2rem 0.55rem;
    margin-bottom: 0.75rem;
}

.also-tag--ai     { color: #a78bfa; background: rgba(167, 139, 250, 0.1); border: 1px solid rgba(167,139,250,0.2); }
.also-tag--software { color: #22d3ee; background: rgba(34, 211, 238, 0.08); border: 1px solid rgba(34,211,238,0.15); }
.also-tag--hardware { color: #fb923c; background: rgba(251, 146, 60, 0.08); border: 1px solid rgba(251,146,60,0.15); }

.also-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--zinc-100);
    margin-bottom: 0.5rem;
    letter-spacing: -0.2px;
}

.also-card p {
    font-size: 0.82rem;
    color: var(--zinc-500);
    line-height: 1.65;
}

@media (max-width: 900px) {
    .also-built-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .also-built-grid { grid-template-columns: 1fr; }
    .also-built-statement { font-size: 1rem; }
}

/* ================================
   BLOG — minimal list style
   ================================ */

.blog-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.blog-card {
    display: flex;
    align-items: baseline;
    gap: 2rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.blog-card:first-child {
    border-top: 1px solid var(--border);
}

.blog-card:hover {
    padding-left: 0.8rem;
}

.blog-date {
    color: var(--zinc-600);
    font-size: 0.7rem;
    letter-spacing: 1px;
    font-weight: 400;
    white-space: nowrap;
    min-width: 90px;
    flex-shrink: 0;
}

.blog-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--zinc-400);
    line-height: 1.4;
    margin-bottom: 0;
    transition: color 0.3s;
}

.blog-card:hover .blog-title {
    color: var(--zinc-100);
}

.blog-excerpt {
    display: none;
}

.blog-read-more {
    display: none;
}

/* ================================
   TIMELINE
   ================================ */

.timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border-light);
}

.timeline-item {
    position: relative;
    padding-bottom: 3rem;
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 2rem;
    align-items: start;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -3rem;
    top: 6px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid var(--zinc-600);
    background: var(--zinc-950);
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-marker {
    border-color: var(--white);
    background: var(--white);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

.timeline-date {
    color: var(--zinc-600);
    font-size: 0.7rem;
    letter-spacing: 1px;
    font-weight: 500;
    padding-top: 2px;
    white-space: nowrap;
}

.timeline-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--zinc-100);
    margin-bottom: 0.3rem;
}

.timeline-org {
    display: inline-block;
    color: var(--zinc-500);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: var(--zinc-500);
    font-size: 0.9rem;
    line-height: 1.7;
    max-width: 500px;
}

/* ================================
   RESUME
   ================================ */

.resume-download {
    text-align: center;
    margin-bottom: 3rem;
}

.download-btn {
    display: inline-block;
    padding: 0.9rem 2.2rem;
    background: var(--white);
    color: var(--zinc-950);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.1);
}

.resume-embed {
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.resume-embed iframe {
    width: 100%;
    height: 600px;
    border: none;
}

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

#contact { text-align: center; }

.contact-form-wrapper {
    max-width: 500px;
    margin: 0 auto;
    padding: 3rem;
    text-align: left;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.form-group { margin-bottom: 1.5rem; }

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--zinc-400);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--white);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s var(--ease-out-expo), background 0.3s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--zinc-700);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--zinc-500);
    background: rgba(255, 255, 255, 0.06);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--white);
    color: var(--zinc-950);
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: all 0.3s var(--ease-out-expo);
    margin-top: 0.5rem;
}

.submit-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}

.submit-btn.is-loading {
    position: relative;
}

.submit-btn.is-loading::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    border-radius: 50%;
    border: 2px solid rgba(9, 9, 11, 0.25);
    border-top-color: rgba(9, 9, 11, 0.9);
    animation: spin 0.9s linear infinite;
}

.form-status {
    min-height: 20px;
    margin: 0.25rem 0 0.5rem;
    font-size: 0.9rem;
    color: var(--zinc-600);
}

.form-status.success { color: rgba(255, 255, 255, 0.75); }
.form-status.error { color: #fca5a5; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.1);
    background: var(--zinc-100);
}

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

footer {
    background: var(--zinc-950);
    color: var(--white);
    padding: 5rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer-motto {
    font-size: 1.3rem;
    color: var(--zinc-300);
    margin-bottom: 2rem;
    font-weight: 300;
    letter-spacing: 1px;
    font-style: italic;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.4s var(--ease-out-expo);
    text-decoration: none;
}

.social-icons a:hover {
    border-color: var(--zinc-500);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-3px);
}

.social-icons img {
    width: 18px;
    height: 18px;
    filter: invert(1);
    opacity: 0.6;
    transition: opacity 0.3s;
}

.social-icons a:hover img {
    opacity: 1;
}

.footer-copyright {
    color: var(--zinc-700);
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

/* ================================
   PROJECT PAGES
   ================================ */

.project-header {
    min-height: 45vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 5rem;
    background: var(--zinc-950);
    color: var(--white);
}

.project-header h1 {
    font-size: 3.5rem;
    font-family: var(--font-sans);
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.project-header p {
    color: var(--zinc-500);
    font-size: 1rem;
}

.gallery-section { margin: 3rem 0; }

.gallery-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
}

/* Image gallery for project pages */
.gallery-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.gallery-images.single-col {
    grid-template-columns: 1fr;
}

.gallery-images img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: block;
    background: var(--zinc-900);
    transition: transform 0.6s var(--ease-out-expo);
}

.gallery-images img:hover {
    transform: scale(1.02);
}

.project-specs {
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.project-specs p {
    color: var(--zinc-400);
}

.project-specs h3 {
    color: var(--zinc-100);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.project-specs h3:first-child { margin-top: 0; }

.project-specs ul {
    list-style: none;
    padding: 0;
}

.project-specs li {
    padding: 0.6rem 0;
    color: var(--zinc-400);
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.project-specs li:last-child { border-bottom: none; }

.project-specs li strong {
    color: var(--zinc-200);
}

.project-specs ol {
    padding-left: 20px;
}

.project-specs ol li {
    color: var(--zinc-400);
    border-bottom: none;
}

.project-description {
    font-size: 1.1rem;
    text-align: center;
    max-width: 700px;
    margin: 0 auto 2rem;
    color: var(--zinc-400);
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.9rem 2.2rem;
    background: var(--white);
    color: var(--zinc-950);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    border-radius: 6px;
    transition: all 0.3s var(--ease-out-expo);
}

.back-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.1);
}



/* ================================
   LOGO BANNER
   ================================ */

.logo-banner {
    overflow: hidden;
    padding: 2.5rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--zinc-950);
    position: relative;
}

/* Fade edges */
.logo-banner::before,
.logo-banner::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 120px;
    z-index: 2;
    pointer-events: none;
}

.logo-banner::before {
    left: 0;
    background: linear-gradient(to right, var(--zinc-950), transparent);
}

.logo-banner::after {
    right: 0;
    background: linear-gradient(to left, var(--zinc-950), transparent);
}

.logo-track {
    display: flex;
    align-items: center;
    gap: 4rem;
    width: max-content;
    animation: logoScroll 25s linear infinite;
}

.logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: 44px;
}

.logo-track .logo-name {
    display: none;
    color: var(--zinc-500);
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
}

.logo-track .logo-name.show {
    display: inline;
}

.logo-track img {
    height: 44px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    opacity: 0.85;
    filter: none;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}

.logo-item:hover img {
    opacity: 1;
}

/* SVG logos: lighter gray with high contrast so text is readable on dark background */
.logo-track img[src$=".svg"] {
    filter: grayscale(1) brightness(1.85) contrast(1.5);
    opacity: 0.95;
}

@keyframes logoScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ================================
   PROJECT PHOTO HELPERS
   ================================ */

.photo-hero {
    width: 100%;
    height: 520px;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    display: block;
    border: 1px solid var(--border);
}

.photo-full {
    width: 100%;
    height: 420px;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    display: block;
    margin-top: 1.2rem;
    border: 1px solid var(--border);
}

.photo-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.2rem;
}

.photo-pair img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    display: block;
    border: 1px solid var(--border);
}

/* ================================
   PROJECT GALLERY (mixed image/video)
   ================================ */

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.project-gallery img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: block;
    background: var(--zinc-900);
    transition: transform 0.5s var(--ease-out-expo);
}

.project-gallery img:hover {
    transform: scale(1.02);
}

.project-gallery video {
    width: 100%;
    max-width: 640px;
    aspect-ratio: 16/9;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: block;
    grid-column: 1 / -1;
    margin: 0 auto;
}

.project-item {
    text-align: center;
}

.project-item h3 {
    color: var(--zinc-200);
    margin-bottom: 0.5rem;
}

.project-item p {
    color: var(--zinc-500);
    font-size: 0.9rem;
}

/* ================================
   PROJECT HIGHLIGHTS / DETAILS
   ================================ */

.project-highlights,
.project-details {
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    margin-top: 2rem;
}

.project-highlights p,
.project-details p {
    color: var(--zinc-400);
}

.project-highlights h3,
.project-details h3 {
    color: var(--zinc-100);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.project-highlights h3:first-child,
.project-details h3:first-child { margin-top: 0; }

.project-highlights ul,
.project-details ul {
    list-style: none;
    padding: 0;
}

.project-highlights ol,
.project-details ol {
    padding-left: 20px;
}

.project-highlights li,
.project-details li {
    padding: 0.6rem 0;
    color: var(--zinc-400);
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.project-highlights li:last-child,
.project-details li:last-child { border-bottom: none; }

.project-highlights li strong,
.project-details li strong {
    color: var(--zinc-200);
}

/* Add spacing to project-specs when not first element */
.project-specs { margin-top: 2rem; }

/* ================================
   PROJECT STATUS BAR
   ================================ */

.status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem 0.25rem;
    margin: 2.5rem 0;
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.status-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.status-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--zinc-600);
    background: var(--zinc-950);
    flex-shrink: 0;
}

.status-step.completed .status-circle {
    border-color: var(--white);
    background: var(--white);
}

.status-step span {
    font-size: 0.7rem;
    color: var(--zinc-500);
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.status-step.completed span {
    color: var(--zinc-300);
}

.status-arrow {
    color: var(--zinc-700);
    font-size: 0.85rem;
    flex-shrink: 0;
    padding-bottom: 1rem;
}

/* ================================
   BLOG POST PAGES
   ================================ */

.blog-post {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem;
}

.blog-post h2 {
    font-size: 1.8rem;
    margin: 2.5rem 0 1rem;
    color: var(--zinc-200);
    letter-spacing: -0.5px;
}

.blog-post h3 {
    font-size: 1.3rem;
    margin: 2rem 0 0.8rem;
    color: var(--zinc-300);
}

.blog-post p {
    color: var(--zinc-400);
    font-size: 1.05rem;
    line-height: 1.9;
    margin-bottom: 1.2rem;
}

.blog-post strong {
    color: var(--zinc-200);
}

.blog-post ul,
.blog-post ol {
    color: var(--zinc-400);
    padding-left: 1.5rem;
    margin-bottom: 1.2rem;
}

.blog-post li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.blog-post blockquote {
    border-left: 2px solid var(--border-light);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--zinc-500);
    font-style: italic;
}

.blog-meta {
    color: var(--zinc-600);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

/* ================================
   RANDOM PROJECTS — BENTO GRID
   ================================ */

.rp-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 220px;
    gap: 12px;
    margin-top: 3rem;
}

.rp-card              { grid-column: span 4; grid-row: span 2; }
.rp-card.wide         { grid-column: span 8; grid-row: span 2; }
.rp-card.tall         { grid-column: span 4; grid-row: span 3; }
.rp-card.slim         { grid-column: span 4; grid-row: span 1; }
.rp-card.full         { grid-column: span 12; grid-row: span 2; }

.rp-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--zinc-900);
    cursor: default;
    transition: border-color 0.4s ease, transform 0.4s var(--ease-out-expo);
}

.rp-card:hover {
    border-color: rgba(255,255,255,0.18);
    transform: translateY(-3px);
}

.rp-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    transition: transform 0.7s var(--ease-out-expo);
}

.rp-card:hover img {
    transform: scale(1.06);
}

.rp-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(9,9,11,0.85) 0%,
        rgba(9,9,11,0.35) 45%,
        transparent 100%
    );
    z-index: 2;
}

.rp-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.4rem 1.6rem;
    z-index: 3;
    transform: translateY(4px);
    transition: transform 0.4s var(--ease-out-expo);
}

.rp-card:hover .rp-info {
    transform: translateY(0);
}

.rp-label {
    display: inline-block;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    padding: 0.2rem 0.55rem;
    margin-bottom: 0.5rem;
    backdrop-filter: blur(8px);
}

.rp-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
    margin: 0 0 0.35rem;
    letter-spacing: -0.3px;
}

.rp-desc {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.5;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease-out-expo), opacity 0.35s ease;
    opacity: 0;
}

.rp-card:hover .rp-desc {
    max-height: 80px;
    opacity: 1;
}

.rp-card.wide .rp-title  { font-size: 1.5rem; }
.rp-card.full .rp-title  { font-size: 1.8rem; }
.rp-card.full .rp-info   { padding: 2rem 2.4rem; }
.rp-card.slim .rp-info   { padding: 0.9rem 1.4rem; }
.rp-card.slim .rp-title  { font-size: 0.9rem; }

.rp-card.accent-blue  { background: linear-gradient(135deg, #1a1a3e 0%, #0d0d1a 100%); }
.rp-card.accent-green { background: linear-gradient(135deg, #0d2318 0%, #060f0a 100%); }

.rp-footer {
    text-align: center;
    padding: 3rem 0 1rem;
}

/* ================================
   UTILITY
   ================================ */

.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }

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

@media (max-width: 900px) {
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .timeline-item { grid-template-columns: 90px 1fr; gap: 1.5rem; }
    h2 { font-size: 2.5rem; }
    .gallery-images { grid-template-columns: 1fr; }
    .contact-form-wrapper { max-width: 650px; padding: 2.25rem; }
    .rp-grid { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 200px; }
    .rp-card        { grid-column: span 3; grid-row: span 2; }
    .rp-card.wide   { grid-column: span 6; grid-row: span 2; }
    .rp-card.tall   { grid-column: span 3; grid-row: span 3; }
    .rp-card.slim   { grid-column: span 3; grid-row: span 1; }
    .rp-card.full   { grid-column: span 6; grid-row: span 2; }
}

@media (max-width: 768px) {
    .home-hero h1 { font-size: 3.5rem; letter-spacing: -2px; }
    .home-hero .subtitle { font-size: 1rem; }
    .hero-eyebrow { font-size: 0.65rem; margin-bottom: 1.5rem; }
    .hero-tags { gap: 0.4rem; }
    .hero-tag { font-size: 0.6rem; padding: 0.25rem 0.7rem; }
    .hero-actions { flex-direction: column; gap: 0.75rem; }
    .cta-button { width: 100%; max-width: 260px; justify-content: center; }
    nav { gap: 1.5rem; padding: 1rem; }
    nav a { font-size: 0.75rem; }
    section { padding: 5rem 1.5rem; }
    h2 { font-size: 2rem; margin-bottom: 0.8rem; letter-spacing: -1px; }
    .about-container { grid-template-columns: 1fr; gap: 3rem; }
    .stats-grid { gap: 2.5rem; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .timeline-item { grid-template-columns: 80px 1fr; gap: 1rem; }
    .timeline-date { font-size: 0.6rem; }
    .project-header h1 { font-size: 2.2rem; }
    .footer-motto { font-size: 1.1rem; }
    .project-gallery { grid-template-columns: repeat(2, 1fr); }
    .project-gallery video { grid-column: span 2; }
    .status-bar { padding: 1.5rem; }
    .status-arrow { display: none; }
}

@media (max-width: 600px) {
    .rp-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; gap: 8px; }
    .rp-card,
    .rp-card.wide,
    .rp-card.tall,
    .rp-card.slim,
    .rp-card.full { grid-column: span 2; grid-row: span 1; }
    .rp-card .rp-title { font-size: 0.95rem; }
}

@media (max-width: 480px) {
    .home-hero h1 { font-size: 2.5rem; letter-spacing: -1.5px; }
    .home-hero { min-height: 100vh; min-height: 100dvh; }
    .hero-eyebrow { font-size: 0.6rem; }
    .hero-tags { gap: 0.35rem; margin-bottom: 2rem; }
    .hero-tag { font-size: 0.55rem; }
    nav { gap: 0.8rem; }
    nav a { font-size: 0.65rem; }
    h2 { font-size: 1.8rem; }
    .stats-grid { gap: 2rem; }
    .stat-number { font-size: 2.2rem; }
    .project-gallery { grid-template-columns: 1fr; }
    .project-gallery video { grid-column: span 1; }
    .photo-hero { height: 280px; }
    .photo-full { height: 260px; }
    .photo-pair { grid-template-columns: 1fr; }
    .photo-pair img { height: 260px; }
}
