:root {
    --void: #0A0A0A;
    --gold: #C9A84C;
    --parchment: #F5F2EC;
    --stone: #8A8880;
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Jost', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--void);
    color: var(--parchment);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

/* 3% opacity SVG noise filter via repeating background */
.noise-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Typography base */
h1, h2, h3, h4, h5, h6, .logo {
    font-family: var(--font-heading);
    font-weight: 300;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(10, 10, 10, 0.4);
    border-bottom: 1px solid transparent;
    transition: border-color 0.4s ease;
}

nav.scrolled {
    border-bottom: 1px solid var(--gold);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4rem;
    max-width: 1600px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 2px;
}

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

.nav-links a {
    color: var(--parchment);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

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

/* Section styling */
section {
    padding: 8rem 4rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* Hero */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 6rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    width: 100%;
    position: relative;
    height: 100%;
}

.hero-content {
    grid-column: 1 / 9;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.hero h1 {
    font-size: 5vw;
    font-style: italic;
    color: var(--parchment);
    line-height: 1.1;
    margin-bottom: 3rem;
    max-width: 90%;
}

.cta-link {
    color: var(--parchment);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 5px;
}

.cta-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: transparent;
    transition: background-color 0.3s ease;
}

.cta-link:hover::after {
    background-color: var(--gold);
}

.hairline {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc((100% / 12) * 8);
    width: 1px;
    background-color: var(--gold);
    opacity: 0.3;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
}

.about-left h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--parchment);
}

.about-left p {
    font-size: 1.1rem;
    color: var(--stone);
    margin-bottom: 3rem;
    max-width: 80%;
}

.tech-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.tech-card {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(138, 136, 128, 0.2);
    padding: 2rem;
    font-size: 0.9rem;
    color: var(--parchment);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.tech-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
}

.about-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pillar {
    padding: 2rem 0;
    border-bottom: 0.5px solid var(--stone);
    font-size: 1.5rem;
    font-family: var(--font-heading);
    color: var(--parchment);
    display: flex;
    align-items: center;
}

.pillar:first-child {
    border-top: 0.5px solid var(--stone);
}

.pillar-num {
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 0.9rem;
    margin-right: 2rem;
}

/* Portfolio Section */
.portfolio-content {
    padding-top: 4rem;
    display: flex;
    flex-direction: column;
    gap: 8rem;
}

.project-card {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 8rem;
    align-items: center;
}

.project-visual {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    background-color: #111;
    border: 1px solid rgba(201, 168, 76, 0.2);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.studybalance-logo {
    position: absolute;
    height: auto;
    z-index: 2;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
    border-radius: 12px;
    transition: transform 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#studybalance-img {
    width: 170px;
}

#unitly-img {
    width: 280px;
}

.project-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: opacity 0.5s ease;
}

.project-card:hover .project-bg-img {
    opacity: 0.8;
}

.project-tag {
    color: var(--gold);
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.project-name {
    font-size: 3rem;
    margin-bottom: 3rem;
}

.project-metadata-label, .footer-label {
    color: var(--stone);
    font-size: 0.8rem;
    font-family: monospace;
    margin-bottom: 1rem;
}

.project-metadata {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    color: var(--stone);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.meta-value {
    color: var(--parchment);
    font-size: 0.9rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--parchment);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--gold);
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    animation: pulse 2s infinite ease-out;
}

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* Footer Section */
footer {
    padding: 8rem 4rem 4rem;
    max-width: 1600px;
    margin: 0 auto;
    border-top: 1px solid rgba(138, 136, 128, 0.2);
}

.footer-title {
    font-size: 6rem;
    text-align: center;
    color: var(--parchment);
    margin-bottom: 6rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.footer-text, .social-links a {
    color: var(--parchment);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a:hover {
    color: var(--gold);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .nav-container { padding: 1.5rem 2rem; }
    section { padding: 6rem 2rem; }
    
    .hero-grid { grid-template-columns: 1fr; }
    .hero-content { grid-column: 1 / -1; }
    .hero h1 { font-size: 3rem; max-width: 100%; }
    .hairline { display: none; }
    
    .about-grid { grid-template-columns: 1fr; gap: 4rem; }
    .about-left p { max-width: 100%; }
    
    .project-card { grid-template-columns: 1fr; gap: 2rem; }
    
    .footer-title { font-size: 4rem; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    
    .project-metadata { grid-template-columns: 1fr 1fr; }
    
    .footer-bottom { flex-direction: column; align-items: flex-start; gap: 2rem; }
}

/* Toast Pop-up */
.toast {
    position: fixed;
    transform: translateX(-50%) translateY(-10px);
    background-color: var(--gold);
    color: var(--void);
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    z-index: 1000;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
