/* --- Root Variables --- */
:root {
    --brand-100: #fffbf7;
    --brand-300: #ecd4bc;
    --brand-400: #d4b28a;
    --brand-500: #b58a5c;
    --brand-600: #8f6539;
    --brand-700: #6b4322;
    --brand-800: #4a2a13;
    --brand-900: #2d1809;
    --font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    
    --bg-primary: var(--brand-900);
    --bg-secondary: var(--brand-800);
    --surface: rgba(181, 138, 92, 0.1);
    --surface-hover: rgba(181, 138, 92, 0.15);
    --border: rgba(181, 138, 92, 0.2);
    --border-hover: rgba(181, 138, 92, 0.35);
    --text-primary: var(--brand-100);
    --text-secondary: var(--brand-300);
    --text-muted: var(--brand-500);
    --accent: var(--brand-500);
    --accent-rgb: 181, 138, 92;
    --accent-dark: var(--brand-600);
    --radius: 16px;
    --radius-sm: 12px;
    --max-width: 980px;
    --shadow: 0 4px 6px -1px rgba(26, 16, 11, 0.3), 0 2px 4px -1px rgba(26, 16, 11, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(26, 16, 11, 0.4), 0 4px 6px -2px rgba(26, 16, 11, 0.3);
    
    font-size: 16px;
}

/* --- Essential Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes progressFill {
    from {
        width: 0;
    }
}

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

@keyframes shimmer {
    0% {
        left: -100%;
    }
    
    100% {
        left: 100%;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.4);
    }
    
    70% {
        box-shadow: 0 0 0 12px rgba(var(--accent-rgb), 0);
    }
    
    100% {
        box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0);
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--brand-800) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    font-size: 16px;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(184, 145, 106, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

body.menu-open {
    overflow: hidden;
}

/* --- steam canvas --- */
#steamCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* --- Container --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Buttons --- */
.btn {
    padding: 12px 24px;
    border-radius: 9999px;
    border: 0;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: var(--brand-100);
    box-shadow: var(--shadow);
    animation: pulse 2s infinite 1s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    animation: none;
}

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

.btn-secondary:hover {
    background: var(--surface);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* --- Cards --- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 24px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    max-width: 700px;
    margin: 0 auto;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.1), transparent);
    transition: left 0.6s;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.card p+p {
    margin-top: 16px;
}

.card h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.card p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

/* --- Navigation --- */
.nav {
    position: sticky;
    top: 16px;
    z-index: 1000;
    padding: 12px 0;
    margin-bottom: 24px;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    padding: 12px 20px;
    transition: all 0.3s ease;
}

.nav-inner:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
}

/* Brand Logo */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    transition: all 0.3s ease;
}

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

.brand-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--brand-100);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.brand:hover .brand-icon {
    transform: translateY(-2px) rotate(3deg);
}

.brand-icon img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

/* Desktop Navigation */
.nav-menu {
    display: none;
    gap: 24px;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 0;
    position: relative;
    transition: all 0.3s ease;
}

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

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

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

.nav-cta {
    background: transparent;
    border: 1px solid var(--border);
    padding: 10px 18px;
    border-radius: 9999px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.nav-cta:hover {
    background: var(--surface);
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* Mobile Navigation */
.hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.hamburger-btn:hover {
    background: var(--surface);
}

.hamburger-btn svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-secondary);
    transition: all 0.3s ease;
}

.hamburger-btn:hover svg {
    stroke: var(--accent);
}

.icon-close {
    display: none;
}

body.menu-open .hamburger-btn .icon-menu {
    display: none;
}

body.menu-open .hamburger-btn .icon-close {
    display: block;
}

.mobile-nav-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 16, 11, 0.98);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 999;
}

body.menu-open .mobile-nav-container {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-container .nav-link {
    font-size: 24px;
    color: var(--text-primary);
}

.mobile-nav-container .nav-cta {
    font-size: 20px;
    padding: 16px 32px;
    margin-top: 20px;
}

/* --- Text-Only Hero Section --- */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.hero-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    width: 100%;
    max-width: 1100px;
}

.hero-content {
    flex: 1 1 480px;
    text-align: left;
    z-index: 2;
}

.hero-visual {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-visual svg {
    width: 100%;
    max-width: 380px;
    opacity: 0.9;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.08));
    animation: float 6s ease-in-out infinite;
}

.hero-title {
    font-size: clamp(32px, 4vw, 56px);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 19px;
    animation: fadeInUp 0.8s ease-out both;
}

.hero-title span {
    background: linear-gradient(135deg, var(--brand-300) 0%, var(--brand-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-lead {
    font-size: clamp(16px, 1.2vw, 21px);
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 520px;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 8px;
    animation: fadeInUp 0.8s ease-out 0.5s both;
    justify-content: center;
}

/* --- Quick Stats Section --- */
.quick-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    justify-content: center;
}

.stat-card {
    flex: 1 1 200px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out both;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.1), transparent);
    transition: left 0.6s;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.3s;
}

.stat-card:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-title {
    font-weight: 700;
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.stat-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

/* --- Sections --- */
section {
    padding: 64px 0;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeInUp 0.8s ease-out both;
}

.section-title::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-dark) 100%);
    border-radius: 3px;
}

.cards-grid {
    display: grid;
    gap: 24px;
}

.cards-grid.two-col {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* --- Featured Work --- */
.featured-work {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 10%;
}

.featured-work .work-card {
    flex: 1 1 300px;
    max-width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    animation: fadeInUp 0.8s ease-out both;
}

.featured-work .work-card:nth-child(1) {
    animation-delay: 0.1s;
}

.featured-work .work-card:nth-child(2) {
    animation-delay: 0.2s;
}

.featured-work .work-card:nth-child(3) {
    animation-delay: 0.3s;
}

.work-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.1), transparent);
    transition: left 0.6s;
    z-index: 1;
}

.work-card:hover::before {
    left: 100%;
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.work-image {
    height: 180px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-100);
    font-size: 24px;
    font-weight: 700;
}

.work-content {
    padding: 24px;
}

.work-tags {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.work-tag {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.work-tag:hover {
    background: rgba(var(--accent-rgb), 0.2);
}

/* --- Skills --- */
.skill {
    margin-bottom: 25px;
    animation: fadeInUp 0.8s ease-out both;
}

.skill:nth-child(1) {
    animation-delay: 0.1s;
}

.skill:nth-child(2) {
    animation-delay: 0.2s;
}

.skill:nth-child(3) {
    animation-delay: 0.3s;
}

.skill:nth-child(4) {
    animation-delay: 0.4s;
}

.skill:nth-child(5) {
    animation-delay: 0.5s;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.skill-name,
.skill-percentage {
    font-weight: 600;
    color: var(--text-primary);
}

.progress-bar {
    height: 12px;
    background-color: var(--surface);
    border-radius: 6px;
    overflow: hidden;
}

.progress {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--accent), var(--accent-dark));
    width: 0;
    animation: progressFill 1.5s ease-out forwards;
    position: relative;
    overflow: hidden;
}

.progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

/* --- Contact --- */
.contact-details {
    font-family: "Space Grotesk", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    margin-top: 16px;
}

.contact-details h4 {
    color: var(--text-secondary);
    font-weight: 400;
    margin: 4px 0;
    letter-spacing: 0.5px;
}

/* --- Footer --- */
.footer {
    padding: 60px 0 40px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    border-top: 1px solid var(--border);
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
}

.footer-socials a {
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.footer-socials a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.footer-socials svg {
    width: 24px;
    height: 24px;
}

/* --- Scroll Animations --- */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-dark);
}

/* --- Responsive --- */
@media (min-width: 769px) {
    .nav-menu {
        display: flex;
    }
    
    .hamburger-btn {
        display: none;
    }
    
    .mobile-nav-container {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none !important;
    }
    
    .hero-inner {
        flex-direction: column-reverse;
        text-align: center;
        gap: 40px;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-visual img {
        max-width: 260px;
    }
    
    .hero-actions {
        flex-direction: column;
        justify-content: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .quick-stats-section {
        padding: 40px 0;
    }
    
    .quick-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .stat-card {
        flex: 1 1 100%;
        width: 100%;
        max-width: 300px;
    }
    
    .cards-grid.two-col,
    .featured-work {
        grid-template-columns: 1fr;
    }
    
    .featured-work {
        padding-inline: 0;
    }
    
    .featured-work .work-card {
        flex: 1 1 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-lead {
        font-size: 15px;
    }
    
    .hero-visual img {
        max-width: 200px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .card {
        padding: 20px;
    }
    
    .stat-card {
        padding: 24px 16px;
    }
    
    .featured-work .work-card {
        flex: 1 1 100%;
    }
}
