:root {
    --black: #0A0A0A;
    --white: #F4F4F4;
    --orange: #FF3800;
    --font-grotesk: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;
    --transition-snappy: cubic-bezier(0.19, 1, 0.22, 1);
}

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

@media (pointer: fine) {
    * {
        cursor: none !important; /* Hide default cursor only on desktop */
    }
}

body {
    background-color: var(--black);
    color: var(--white);
    font-family: var(--font-grotesk);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Grain Overlay --- */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3%3Ffilter 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");
}

/* --- Custom Cursor --- */
.custom-cursor {
    width: 8px;
    height: 8px;
    background-color: var(--orange);
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 30000;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s var(--transition-snappy);
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid var(--white);
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 29999;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: width 0.3s var(--transition-snappy), height 0.3s var(--transition-snappy), background-color 0.3s, border-color 0.3s, opacity 0.3s var(--transition-snappy);
}

.cursor-follower.active {
    width: 80px;
    height: 80px;
    background-color: rgba(255, 56, 0, 0.1);
    border-color: var(--orange);
}

/* --- Bento Grid --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(100px, auto);
    width: 100%;
    border-top: 1px solid var(--white);
    border-left: 1px solid var(--white);
}

.bento-item {
    border-right: 1px solid var(--white);
    border-bottom: 1px solid var(--white);
    padding: 40px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* --- Specific Cells Layout --- */
.hero-cell {
    grid-column: span 8;
    grid-row: span 4;
    background-color: var(--black);
}

.profile-cell {
    grid-column: span 4;
    grid-row: span 4;
    padding: 0; /* Full bleed image */
}

.terminal-cell {
    grid-column: span 4;
    grid-row: span 6;
    background-color: #111;
    justify-content: flex-start; /* Ensure terminal content starts from the top */
}

.gallery-cell {
    grid-column: span 8;
    grid-row: span 3;
}

.about-cell {
    grid-column: span 4;
    grid-row: span 3;
    display: flex;
    justify-content: flex-start;
    flex-direction: column;
}

.hobbies-cell {
    grid-column: span 4;
    grid-row: span 3;
    background-color: var(--black);
    display: flex;
    justify-content: flex-start;
    flex-direction: column;
}

.contact-cell {
    grid-column: span 12;
    grid-row: span 3;
    background-color: var(--white);
    color: var(--black);
    padding: 0;
    transition: background-color 0.4s var(--transition-snappy);
}

/* --- Typography --- */
.monospace {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.massive-text {
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 900;
    line-height: 0.85;
    letter-spacing: -0.05em;
    margin: 20px 0;
}

.titles {
    display: flex;
    gap: 15px;
    font-size: 1.2rem;
    font-weight: 700;
}

.divider {
    color: var(--orange);
}

/* --- Profile Image --- */
.profile-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.profile-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-image-container .label {
    position: absolute;
    bottom: 20px;
    left: 20px;
    padding: 5px 10px;
    background: var(--orange);
    color: var(--white);
    z-index: 3;
}

/* --- Global Cell Headers --- */
.cell-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cell-header.monospace span,
.cell-header.monospace h2 {
    font-size: 0.8rem;
    font-weight: normal;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* --- Terminal Specific --- */
.terminal-cell .cell-header {
    justify-content: flex-start;
}

.terminal-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background-color: #FF5F56; }
.dot.yellow { background-color: #FFBD2E; }
.dot.green { background-color: #27C93F; }

.terminal-title {
    margin-left: 12px;
    opacity: 0.6;
    font-size: 0.8rem;
}

.terminal-subtitle {
    margin-left: auto;
    opacity: 1;
    font-size: 0.8rem;
    font-weight: normal;
}

.terminal-content {
    font-size: 0.9rem;
    line-height: 1.6;
}

.prompt { color: var(--orange); }

.skill-group {
    margin: 15px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-item, .hobby-item {
    background-color: #222;
    padding: 4px 8px;
    border-radius: 2px;
}

.in-progress {
    text-decoration: line-through;
    opacity: 0.5;
}

.in-progress::after {
    content: " [ PENDING ]";
    font-size: 0.7rem;
    opacity: 0.7;
    text-decoration: none;
    display: inline-block;
}

.hobby-group {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.blinking-cursor {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* --- Gallery --- */
.gallery-track {
    display: flex;
    gap: 20px;
    height: 100%;
    padding-top: 20px;
}

.gallery-item {
    flex: 1;
    overflow: hidden;
    background: #111;
    filter: grayscale(1);
    transition: filter 0.4s var(--transition-snappy), transform 0.4s var(--transition-snappy);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item:hover {
    filter: grayscale(0);
    transform: scale(1.02);
}

/* --- About --- */
.about-cell p {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-top: 20px;
}

/* --- Contact --- */
.massive-link {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    width: 100%;
    height: 100%;
    padding: 60px;
    text-decoration: none;
    color: inherit;
    font-size: clamp(3rem, 8vw, 8rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    transition: color 0.3s;
}

.contact-cell:hover {
    background-color: var(--orange);
}

.contact-cell:hover .massive-link {
    color: var(--white);
}

.contact-footer {
    position: absolute;
    bottom: 20px;
    left: 40px;
    right: 40px;
    display: flex;
    justify-content: space-between;
}
/* --- Contact Overlay --- */
.contact-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--orange);
    color: var(--black);
    z-index: 20000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    opacity: 0;
}

.overlay-close {
    position: absolute;
    top: 40px;
    right: 40px;
    background: none;
    border: 1px solid var(--black);
    color: var(--black);
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.overlay-close:hover {
    background-color: var(--black);
    color: var(--orange);
}

.overlay-content {
    max-width: 1200px;
    width: 100%;
}

.overlay-content h2 {
    margin-bottom: 60px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.detail-item {
    font-size: clamp(1.2rem, 3vw, 2.5rem);
    display: flex;
    gap: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 15px;
}

.detail-item a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s;
}

.detail-item a:hover {
    opacity: 0.6;
}

.detail-item .label {
    opacity: 0.5;
}

@media (max-width: 768px) {
    .contact-overlay {
        padding: 30px;
    }
    
    .overlay-close {
        top: 20px;
        right: 20px;
    }
    
    .detail-item {
        flex-direction: column;
        gap: 5px;
    }
}
/* --- Responsiveness --- */
@media (max-width: 1024px) {
    .hero-cell { grid-column: span 12; }
    .profile-cell { grid-column: span 6; grid-row: span 4; }
    .terminal-cell { grid-column: span 6; grid-row: span 4; }
    .gallery-cell { grid-column: span 12; }
    .about-cell { grid-column: span 6; }
    .hobbies-cell { grid-column: span 6; }
}

@media (max-width: 768px) {
    .profile-cell, .terminal-cell, .about-cell, .hobbies-cell { grid-column: span 12; }
    .bento-item { padding: 30px; }
    .massive-text { font-size: 5rem; }
    
    /* Hero Meta Line Break */
    .meta.monospace .loc-divider { display: none; }
    .meta.monospace span { display: block; }

    /* Contact Link Scaling & Centering */
    .massive-link { 
        padding: 40px 20px; 
        font-size: clamp(2rem, 10vw, 3.5rem); 
        flex-direction: row;
        justify-content: center;
        gap: 15px;
        text-align: center;
    }
    .massive-link .arrow {
        font-size: 0.8em;
    }
}
